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: CURSOR c_OSFMAssembly IS

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: CURSOR c_OSFMAssembly IS
132: SELECT mmt.completion_transaction_id cpl_txn_id,

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: CURSOR c_OSFMAssembly IS
132: SELECT mmt.completion_transaction_id cpl_txn_id,
133: mmt.transaction_action_id txn_action_id,

Line 161: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED

157: AND mmt.move_transaction_id = wmti.transaction_id
158: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
159: AND wmti.group_id = p_gib.group_id
160: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
161: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED
162: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
163: WIP_CONSTANTS.CPLASSY_ACTION);
164:
165: l_repAssembly c_repAssembly%ROWTYPE;

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

158: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
159: AND wmti.group_id = p_gib.group_id
160: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
161: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED
162: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
163: WIP_CONSTANTS.CPLASSY_ACTION);
164:
165: l_repAssembly c_repAssembly%ROWTYPE;
166: l_discAssembly c_discAssembly%ROWTYPE;

Line 163: WIP_CONSTANTS.CPLASSY_ACTION);

159: AND wmti.group_id = p_gib.group_id
160: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
161: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED
162: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
163: WIP_CONSTANTS.CPLASSY_ACTION);
164:
165: l_repAssembly c_repAssembly%ROWTYPE;
166: l_discAssembly c_discAssembly%ROWTYPE;
167: l_OSFMAssembly c_OSFMAssembly%ROWTYPE;

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

176: l_error_msg VARCHAR2(1000);
177: l_error_count NUMBER;
178: BEGIN
179: -- write parameter value to log file
180: IF (l_logLevel <= wip_constants.trace_logging) THEN
181: l_params(1).paramName := 'p_group_id';
182: l_params(1).paramValue := p_gib.group_id;
183: l_params(2).paramName := 'p_mtl_header_id';
184: l_params(2).paramValue := p_gib.mtl_header_id;

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

193: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.backflush_assy_pull',
194: p_params => l_params,
195: x_returnStatus => l_returnStatus);
196: END IF;
197: IF(p_entity_type = WIP_CONSTANTS.REPETITIVE) THEN
198: FOR l_repAssembly IN c_repAssembly LOOP
199: wip_bflProc_priv.backflush(
200: p_wipEntityID => l_repAssembly.txn_src_id,
201: p_orgID => l_repAssembly.org_id,

Line 209: p_entityType => WIP_CONSTANTS.REPETITIVE,

205: -- Fixed bug 5056289. Pass move_id as a batch_id because we want
206: -- inventory to fail only components related to a specific move record.
207: p_batchID => p_move_txn_id,
208: p_txnType => l_repAssembly.txn_type,
209: p_entityType => WIP_CONSTANTS.REPETITIVE,
210: p_tblName => WIP_CONSTANTS.MTI_TBL,
211: p_lineID => l_repAssembly.rep_line_id,
212: p_cplTxnID => l_repAssembly.cpl_txn_id,
213: -- Fixed bug 5014211. Stamp move_transaction_id for assembly

Line 210: p_tblName => WIP_CONSTANTS.MTI_TBL,

206: -- inventory to fail only components related to a specific move record.
207: p_batchID => p_move_txn_id,
208: p_txnType => l_repAssembly.txn_type,
209: p_entityType => WIP_CONSTANTS.REPETITIVE,
210: p_tblName => WIP_CONSTANTS.MTI_TBL,
211: p_lineID => l_repAssembly.rep_line_id,
212: p_cplTxnID => l_repAssembly.cpl_txn_id,
213: -- Fixed bug 5014211. Stamp move_transaction_id for assembly
214: -- pull components so that we will have a link if component

Line 218: p_fmMoveProcessor => WIP_CONSTANTS.YES,

214: -- pull components so that we will have a link if component
215: -- records fail inventory validation.
216: p_movTxnID => l_repAssembly.move_txn_id,
217: -- End fix of 5014211.
218: p_fmMoveProcessor => WIP_CONSTANTS.YES,
219: p_mtlTxnMode => p_gib.mtl_mode,
220: p_reasonID => l_repAssembly.reason_id,
221: p_reference => l_repAssembly.reference,
222: -- Set lock_flag to 1 to prevent inventory worker pick up the record.

Line 224: p_lockFlag => WIP_CONSTANTS.YES,

220: p_reasonID => l_repAssembly.reason_id,
221: p_reference => l_repAssembly.reference,
222: -- Set lock_flag to 1 to prevent inventory worker pick up the record.
223: -- Need this change because we will commit after each TM call.
224: p_lockFlag => WIP_CONSTANTS.YES,
225: x_lotSerRequired => l_ls_required,
226: x_bfRequired => l_bf_required,
227: x_returnStatus => l_returnStatus);
228:

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

228:
229: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
230: raise fnd_api.g_exc_unexpected_error;
231: ELSE
232: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
233: -- If we need to gather more lot/serial, error out because
234: -- we cannot gather lot/serial for background transaction.
235: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
236: fnd_msg_pub.add;

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

237: raise fnd_api.g_exc_unexpected_error;
238: END IF;
239: END IF; -- check return status
240: END LOOP; -- repetitive schedule
241: ELSIF(p_entity_type = WIP_CONSTANTS.DISCRETE) THEN
242: FOR l_discAssembly IN c_discAssembly LOOP
243: wip_bflProc_priv.backflush(
244: p_wipEntityID => l_discAssembly.txn_src_id,
245: p_orgID => l_discAssembly.org_id,

Line 254: p_tblName => WIP_CONSTANTS.MTI_TBL,

250: -- inventory to fail only components related to a specific move record.
251: p_batchID => p_move_txn_id,
252: p_txnType => l_discAssembly.txn_type,
253: p_entityType => l_discAssembly.entity_type,
254: p_tblName => WIP_CONSTANTS.MTI_TBL,
255: p_cplTxnID => l_discAssembly.cpl_txn_id,
256: -- Fixed bug 5014211. Stamp move_transaction_id for assembly
257: -- pull components so that we will have a link if component
258: -- records fail inventory validation.

Line 261: p_fmMoveProcessor => WIP_CONSTANTS.YES,

257: -- pull components so that we will have a link if component
258: -- records fail inventory validation.
259: p_movTxnID => l_discAssembly.move_txn_id,
260: -- End fix of 5014211.
261: p_fmMoveProcessor => WIP_CONSTANTS.YES,
262: p_mtlTxnMode => p_gib.mtl_mode,
263: p_reasonID => l_discAssembly.reason_id,
264: p_reference => l_discAssembly.reference,
265: -- Set lock_flag to 1 to prevent inventory worker pick up the record.

Line 267: p_lockFlag => WIP_CONSTANTS.YES,

263: p_reasonID => l_discAssembly.reason_id,
264: p_reference => l_discAssembly.reference,
265: -- Set lock_flag to 1 to prevent inventory worker pick up the record.
266: -- Need this change because we will commit after each TM call.
267: p_lockFlag => WIP_CONSTANTS.YES,
268: x_lotSerRequired => l_ls_required,
269: x_bfRequired => l_bf_required,
270: x_returnStatus => l_returnStatus);
271:

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

271:
272: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
273: raise fnd_api.g_exc_unexpected_error;
274: ELSE
275: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
276: -- If we need to gather more lot/serial, error out because
277: -- we cannot gather lot/serial for background transaction.
278: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
279: fnd_msg_pub.add;

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

280: raise fnd_api.g_exc_unexpected_error;
281: END IF;
282: END IF; -- check return status
283: END LOOP; -- Discrete
284: ELSIF(p_entity_type = WIP_CONSTANTS.LOTBASED) THEN
285: FOR l_OSFMAssembly IN c_OSFMAssembly LOOP
286: wsm_serial_support_grp.backflush_comp(
287: p_wipEntityID => l_OSFMAssembly.txn_src_id,
288: p_orgID => l_OSFMAssembly.org_id,

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

311:
312: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
313: raise fnd_api.g_exc_unexpected_error;
314: ELSE
315: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
316: -- If we need to gather more lot/serial, error out because
317: -- we cannot gather lot/serial for background transaction.
318: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
319: fnd_msg_pub.add;

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

322: END IF; -- check return status
323: END LOOP; -- OSFM
324: END IF; -- entity_type check
325: -- write to the log file
326: IF (l_logLevel <= wip_constants.trace_logging) THEN
327: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.backflush_assy_pull',
328: p_procReturnStatus => 'S',
329: p_msg => 'procedure complete',
330: x_returnStatus => l_returnStatus);

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

345: l_msg VARCHAR(240);
346: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
347: BEGIN
348: -- write parameter value to log file
349: IF (l_logLevel <= wip_constants.trace_logging) THEN
350: l_params(1).paramName := 'p_mtl_header_id';
351: l_params(1).paramValue := p_mtl_header_id;
352: l_params(2).paramName := 'p_group_id';
353: l_params(2).paramValue := p_group_id;

Line 361: SET wmti.process_status = WIP_CONSTANTS.ERROR

357: END IF;
358: -- Update status of move record to error if components fail inventory
359: -- validation.
360: UPDATE wip_move_txn_interface wmti
361: SET wmti.process_status = WIP_CONSTANTS.ERROR
362: WHERE wmti.group_id = p_group_id
363: AND EXISTS
364: (SELECT 1
365: FROM mtl_transactions_interface mti

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

366: WHERE mti.transaction_header_id = p_mtl_header_id
367: AND mti.move_transaction_id = wmti.transaction_id
368: AND mti.error_explanation IS NOT NULL);
369:
370: IF (l_logLevel <= wip_constants.full_logging) THEN
371: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
372: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
373: fnd_message.set_token('ENTITY2', 'WIP_MOVE_TXN_INTERFACE');
374: l_msg := fnd_message.get;

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

382: (SELECT mti.transaction_interface_id
383: FROM mtl_transactions_interface mti
384: WHERE mti.transaction_header_id = p_mtl_header_id);
385:
386: IF (l_logLevel <= wip_constants.full_logging) THEN
387: l_msg := SQL%ROWCOUNT ||
388: ' rows deleted from mtl_transaction_lots_interface';
389: wip_logger.log(p_msg => l_msg,
390: x_returnStatus => l_returnStatus);

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

393: -- Delete error records from MTI
394: DELETE FROM mtl_transactions_interface
395: WHERE transaction_header_id = p_mtl_header_id;
396:
397: IF (l_logLevel <= wip_constants.full_logging) THEN
398: l_msg := SQL%ROWCOUNT ||
399: ' rows deleted from mtl_transactions_interface';
400: wip_logger.log(p_msg => l_msg,
401: x_returnStatus => l_returnStatus);

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

401: x_returnStatus => l_returnStatus);
402: END IF;
403:
404: l_returnStatus := fnd_api.g_ret_sts_success;
405: IF (l_logLevel <= wip_constants.trace_logging) THEN
406: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.component_cleanup',
407: p_procReturnStatus => l_returnStatus,
408: p_msg => 'procedure complete',
409: x_returnStatus => l_returnStatus);

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

495: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
496: l_count NUMBER;
497: BEGIN
498: -- write parameter value to log file
499: IF (l_logLevel <= wip_constants.trace_logging) THEN
500: l_params(1).paramName := 'p_mtl_header_id';
501: l_params(1).paramValue := p_mtl_header_id;
502: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.write_mtl_errors',
503: p_params => l_params,

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

524: -- transactions. This will mislead both customer and developer if transaction
525: -- fail inventory validation code.
526: fnd_msg_pub.initialize;
527:
528: IF (l_logLevel <= wip_constants.full_logging) THEN
529: wip_logger.log(p_msg => l_count || ' records inserted',
530: x_returnStatus => l_returnStatus);
531: END IF;
532:

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

530: x_returnStatus => l_returnStatus);
531: END IF;
532:
533: l_returnStatus := fnd_api.g_ret_sts_success;
534: IF (l_logLevel <= wip_constants.trace_logging) THEN
535: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.write_mtl_errors',
536: p_procReturnStatus => l_returnStatus,
537: p_msg => 'procedure complete',
538: x_returnStatus => l_returnStatus);

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

541: WHEN others THEN
542: l_returnStatus := fnd_api.g_ret_sts_unexp_error;
543: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
544:
545: IF (l_logLevel <= wip_constants.trace_logging) THEN
546: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.write_mtl_errors',
547: p_procReturnStatus => l_returnStatus,
548: p_msg => l_errMsg,
549: x_returnStatus => l_returnStatus);

Line 576: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

572: WHERE wop.organization_id = wmti.organization_id
573: AND wop.wip_entity_id = wmti.wip_entity_id
574: AND wmti.group_id = p_group_id
575: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
576: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
577: AND wmti.process_status = WIP_CONSTANTS.RUNNING
578: AND ((wop.operation_seq_num BETWEEN
579: wmti.fm_operation_seq_num AND wmti.to_operation_seq_num)
580: OR (wop.operation_seq_num BETWEEN

Line 577: AND wmti.process_status = WIP_CONSTANTS.RUNNING

573: AND wop.wip_entity_id = wmti.wip_entity_id
574: AND wmti.group_id = p_group_id
575: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
576: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
577: AND wmti.process_status = WIP_CONSTANTS.RUNNING
578: AND ((wop.operation_seq_num BETWEEN
579: wmti.fm_operation_seq_num AND wmti.to_operation_seq_num)
580: OR (wop.operation_seq_num BETWEEN
581: wmti.to_operation_seq_num AND wmti.fm_operation_seq_num))

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

580: OR (wop.operation_seq_num BETWEEN
581: wmti.to_operation_seq_num AND wmti.fm_operation_seq_num))
582: AND wop.organization_id = wrs.organization_id (+)
583: AND wop.repetitive_schedule_id = wrs.repetitive_schedule_id(+)
584: AND NVL(wrs.status_type,-999) IN (-999, WIP_CONSTANTS.RELEASED,
585: WIP_CONSTANTS.COMP_CHRG)
586: AND (( wmti.line_id = wrs.line_id
587: AND wmti.line_id IS NOT NULL
588: AND wop.repetitive_schedule_id IS NOT NULL)

Line 585: WIP_CONSTANTS.COMP_CHRG)

581: wmti.to_operation_seq_num AND wmti.fm_operation_seq_num))
582: AND wop.organization_id = wrs.organization_id (+)
583: AND wop.repetitive_schedule_id = wrs.repetitive_schedule_id(+)
584: AND NVL(wrs.status_type,-999) IN (-999, WIP_CONSTANTS.RELEASED,
585: WIP_CONSTANTS.COMP_CHRG)
586: AND (( wmti.line_id = wrs.line_id
587: AND wmti.line_id IS NOT NULL
588: AND wop.repetitive_schedule_id IS NOT NULL)
589: OR (wmti.line_id IS NULL))

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

596: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
597:
598: BEGIN
599: -- write parameter value to log file
600: IF (l_logLevel <= wip_constants.trace_logging) THEN
601: l_params(1).paramName := 'p_group_id';
602: l_params(1).paramValue := p_gib.group_id;
603: l_params(2).paramName := 'p_txn_date';
604: l_params(2).paramValue := p_gib.txn_date;

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

615: END IF;
616: x_returnStatus := fnd_api.g_ret_sts_success;
617:
618: -- write to the log file
619: IF (l_logLevel <= wip_constants.trace_logging) THEN
620: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',
621: p_procReturnStatus => x_returnStatus,
622: p_msg => 'procedure complete',
623: x_returnStatus => l_returnStatus);

Line 627: WHEN wip_constants.records_locked THEN

623: x_returnStatus => l_returnStatus);
624: END IF;
625:
626: EXCEPTION
627: WHEN wip_constants.records_locked THEN
628: IF(c_wipops%ISOPEN) THEN
629: CLOSE c_wipops;
630: END IF;
631: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

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

630: END IF;
631: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
632: l_errMsg := 'Unable to lock the record in wip_operations';
633:
634: IF (l_logLevel <= wip_constants.trace_logging) THEN
635: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',
636: p_procReturnStatus => x_returnStatus,
637: p_msg => l_errMsg,
638: x_returnStatus => l_returnStatus);

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

646: END IF;
647: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
648: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
649:
650: IF (l_logLevel <= wip_constants.trace_logging) THEN
651: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',
652: p_procReturnStatus => x_returnStatus,
653: p_msg => l_errMsg,
654: x_returnStatus => l_returnStatus);

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

711: AND wo2.operation_seq_num = p_to_op
712: AND wrs.organization_id = p_org_id
713: AND wrs.wip_entity_id = p_wip_id
714: AND wrs.line_id = p_line_id
715: AND wrs.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)
716: AND wrs.date_released < p_txn_date
717: GROUP BY wrs.repetitive_schedule_id,
718: wo2.quantity_waiting_to_move,
719: wrs.quantity_completed,

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

725: wo1.quantity_scrapped,
726: wo1.first_unit_start_date,
727: wrs.first_unit_start_date
728: ORDER BY DECODE(p_forward,
729: WIP_CONSTANTS.YES,NVL(wo1.first_unit_start_date,
730: wrs.first_unit_start_date), -- no routing
731: NULL) ASC,
732: DECODE(p_forward,
733: WIP_CONSTANTS.NO, NVL(wo1.first_unit_start_date,

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

729: WIP_CONSTANTS.YES,NVL(wo1.first_unit_start_date,
730: wrs.first_unit_start_date), -- no routing
731: NULL) ASC,
732: DECODE(p_forward,
733: WIP_CONSTANTS.NO, NVL(wo1.first_unit_start_date,
734: wrs.first_unit_start_date), -- no routing
735: NULL) DESC;
736:
737: l_rsa c_rsa%ROWTYPE;

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

748: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
749:
750: BEGIN
751: -- write parameter value to log file
752: IF (l_logLevel <= wip_constants.trace_logging) THEN
753: l_params(1).paramName := 'p_org_id';
754: l_params(1).paramValue := p_org_id;
755: l_params(2).paramName := 'p_wip_id';
756: l_params(2).paramValue := p_wip_id;

Line 787: l_forward := WIP_CONSTANTS.YES;

783: x_sche_count := 0;
784:
785: IF(p_fm_op < p_to_op) OR
786: (p_fm_op = p_to_op AND p_fm_step <= p_to_step) THEN
787: l_forward := WIP_CONSTANTS.YES;
788: ELSE
789: l_forward := WIP_CONSTANTS.NO;
790: END IF;
791:

Line 789: l_forward := WIP_CONSTANTS.NO;

785: IF(p_fm_op < p_to_op) OR
786: (p_fm_op = p_to_op AND p_fm_step <= p_to_step) THEN
787: l_forward := WIP_CONSTANTS.YES;
788: ELSE
789: l_forward := WIP_CONSTANTS.NO;
790: END IF;
791:
792: OPEN c_rsa(l_forward);
793: WHILE l_need_more LOOP

Line 802: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND

798: ELSE
799: l_recordFound := l_recordFound + 1;
800: l_scheID := l_rsa.scheID;
801:
802: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND
803: p_fm_form = WIP_CONSTANTS.YES) THEN
804: l_cur_qty := l_rsa.completedQty;
805: ELSE
806: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN

Line 803: p_fm_form = WIP_CONSTANTS.YES) THEN

799: l_recordFound := l_recordFound + 1;
800: l_scheID := l_rsa.scheID;
801:
802: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND
803: p_fm_form = WIP_CONSTANTS.YES) THEN
804: l_cur_qty := l_rsa.completedQty;
805: ELSE
806: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
807: l_cur_qty := NVL(l_rsa.queue_qty, 0);

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

802: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND
803: p_fm_form = WIP_CONSTANTS.YES) THEN
804: l_cur_qty := l_rsa.completedQty;
805: ELSE
806: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
807: l_cur_qty := NVL(l_rsa.queue_qty, 0);
808: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
809: l_cur_qty := NVL(l_rsa.run_qty, 0);
810: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN

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

804: l_cur_qty := l_rsa.completedQty;
805: ELSE
806: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
807: l_cur_qty := NVL(l_rsa.queue_qty, 0);
808: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
809: l_cur_qty := NVL(l_rsa.run_qty, 0);
810: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
811: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
812: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN

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

806: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
807: l_cur_qty := NVL(l_rsa.queue_qty, 0);
808: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
809: l_cur_qty := NVL(l_rsa.run_qty, 0);
810: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
811: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
812: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN
813: l_cur_qty := NVL(l_rsa.reject_qty, 0);
814: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN

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

808: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
809: l_cur_qty := NVL(l_rsa.run_qty, 0);
810: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
811: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
812: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN
813: l_cur_qty := NVL(l_rsa.reject_qty, 0);
814: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN
815: l_cur_qty := NVL(l_rsa.scrap_qty, 0);
816: END IF;

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

810: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
811: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
812: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN
813: l_cur_qty := NVL(l_rsa.reject_qty, 0);
814: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN
815: l_cur_qty := NVL(l_rsa.scrap_qty, 0);
816: END IF;
817:
818: IF (p_comp_alloc = WIP_CONSTANTS.YES) THEN

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

814: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN
815: l_cur_qty := NVL(l_rsa.scrap_qty, 0);
816: END IF;
817:
818: IF (p_comp_alloc = WIP_CONSTANTS.YES) THEN
819: -- completion allocation from Tomove of the last op. This logic
820: -- will be used in completion part of EZ Completion transactions
821: l_cur_qty := l_cur_qty + l_rsa.toMoveQty;
822: END IF;

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

821: l_cur_qty := l_cur_qty + l_rsa.toMoveQty;
822: END IF;
823: END IF; -- Return transactions from form
824:
825: IF (p_oc_txn_type = WIP_CONSTANTS.child_txn) THEN
826: NULL; -- just allocate everything to the last schedule
827: ELSE
828: IF (l_cur_qty > 0) THEN
829: l_quantity := l_quantity - l_cur_qty;

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

839: END IF; -- child txn
840: END IF; -- c_rsa%NOTFOUND
841: END LOOP; -- while
842:
843: IF(p_oc_txn_type = WIP_CONSTANTS.parent_txn) THEN
844: -- IF parent and came here, it means that the whole quantity was
845: -- fulfilled without needing overcompletion. In that case it must be
846: -- an error
847: x_proc_status := TVE_OVERCOMPLETION_MISMATCH;

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

855:
856: IF (l_recordFound = 0) THEN -- no schedule found
857: l_errMsg := 'No repetitive schedule found';
858: raise fnd_api.g_exc_unexpected_error;
859: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR
860: (p_txnType = WIP_CONSTANTS.RET_TXN AND
861: p_fm_form = WIP_CONSTANTS.YES)) AND
862: l_quantity > 0) THEN
863: -- parent may have some allocation already made or none

Line 860: (p_txnType = WIP_CONSTANTS.RET_TXN AND

856: IF (l_recordFound = 0) THEN -- no schedule found
857: l_errMsg := 'No repetitive schedule found';
858: raise fnd_api.g_exc_unexpected_error;
859: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR
860: (p_txnType = WIP_CONSTANTS.RET_TXN AND
861: p_fm_form = WIP_CONSTANTS.YES)) AND
862: l_quantity > 0) THEN
863: -- parent may have some allocation already made or none
864: IF (x_sche_count = 0) THEN -- no allocation made yet

Line 861: p_fm_form = WIP_CONSTANTS.YES)) AND

857: l_errMsg := 'No repetitive schedule found';
858: raise fnd_api.g_exc_unexpected_error;
859: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR
860: (p_txnType = WIP_CONSTANTS.RET_TXN AND
861: p_fm_form = WIP_CONSTANTS.YES)) AND
862: l_quantity > 0) THEN
863: -- parent may have some allocation already made or none
864: IF (x_sche_count = 0) THEN -- no allocation made yet
865: x_sche_count := 1;

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

876: x_rsa(x_sche_count).scheID := l_scheID;
877: x_rsa(x_sche_count).scheQty := l_quantity;
878: END IF;
879: END IF; -- x_sche_count = 0
880: ELSIF(p_oc_txn_type = WIP_CONSTANTS.child_txn) THEN
881: -- no allocation should be there yet
882: x_sche_count := 1;
883: x_rsa(x_sche_count).scheID := l_scheID;
884: x_rsa(x_sche_count).scheQty := l_quantity;

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

883: x_rsa(x_sche_count).scheID := l_scheID;
884: x_rsa(x_sche_count).scheQty := l_quantity;
885:
886: ELSE -- IF normal txn
887: IF(p_fm_form = WIP_CONSTANTS.YES) THEN
888: -- skip this validation if call from from because there may be
889: -- a case that completed quantity is negative for repetitive
890: NULL;
891: ELSE

Line 906: x_proc_status := WIP_CONSTANTS.RUNNING;

902: IF(c_rsa%ISOPEN) THEN
903: CLOSE c_rsa;
904: END IF;
905: x_returnStatus := fnd_api.g_ret_sts_success;
906: x_proc_status := WIP_CONSTANTS.RUNNING;
907: -- write to the log file
908: IF (l_logLevel <= wip_constants.trace_logging) THEN
909: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
910: p_procReturnStatus => x_returnStatus,

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

904: END IF;
905: x_returnStatus := fnd_api.g_ret_sts_success;
906: x_proc_status := WIP_CONSTANTS.RUNNING;
907: -- write to the log file
908: IF (l_logLevel <= wip_constants.trace_logging) THEN
909: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
910: p_procReturnStatus => x_returnStatus,
911: p_msg => 'procedure complete',
912: x_returnStatus => l_returnStatus);

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

918: CLOSE c_rsa;
919: END IF;
920: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
921:
922: IF (l_logLevel <= wip_constants.trace_logging) THEN
923: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
924: p_procReturnStatus => x_returnStatus,
925: p_msg => l_errMsg,
926: x_returnStatus => l_returnStatus);

Line 939: x_proc_status := WIP_CONSTANTS.ERROR;

935: IF(c_rsa%ISOPEN) THEN
936: CLOSE c_rsa;
937: END IF;
938: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
939: x_proc_status := WIP_CONSTANTS.ERROR;
940: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
941:
942: IF (l_logLevel <= wip_constants.trace_logging) THEN
943: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',

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

938: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
939: x_proc_status := WIP_CONSTANTS.ERROR;
940: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
941:
942: IF (l_logLevel <= wip_constants.trace_logging) THEN
943: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
944: p_procReturnStatus => x_returnStatus,
945: p_msg => l_errMsg,
946: x_returnStatus => l_returnStatus);

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

975: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
976:
977: BEGIN
978: -- write parameter value to log file
979: IF (l_logLevel <= wip_constants.trace_logging) THEN
980: l_params(1).paramName := 'p_org_id';
981: l_params(1).paramValue := p_org_id;
982: l_params(2).paramName := 'p_scheID';
983: l_params(2).paramValue := p_scheID;

Line 1001: p_move_profile => WIP_CONSTANTS.BACKGROUND,

997: (p_primary_quantity => p_oc_pri_qty,
998: p_parent_txn_id => p_parent_txn_id,
999: -- pass move_profile equal to background so that it will always insert
1000: -- parent group_id to child group_id
1001: p_move_profile => WIP_CONSTANTS.BACKGROUND,
1002: p_sched_id => p_scheID,
1003: p_user_id => p_gib.user_id,
1004: p_login_id => p_gib.login_id,
1005: p_req_id => p_gib.request_id,

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

1068: END IF; -- p_scheID > 0
1069: x_returnStatus := fnd_api.g_ret_sts_success;
1070:
1071: -- write to the log file
1072: IF (l_logLevel <= wip_constants.trace_logging) THEN
1073: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',
1074: p_procReturnStatus => x_returnStatus,
1075: p_msg => 'procedure complete',
1076: x_returnStatus => l_returnStatus);

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

1080: WHEN fnd_api.g_exc_unexpected_error THEN
1081:
1082: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1083:
1084: IF (l_logLevel <= wip_constants.trace_logging) THEN
1085: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',
1086: p_procReturnStatus => x_returnStatus,
1087: p_msg => l_errMsg,
1088: x_returnStatus => l_returnStatus);

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

1095: WHEN others THEN
1096: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1097: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1098:
1099: IF (l_logLevel <= wip_constants.trace_logging) THEN
1100: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',
1101: p_procReturnStatus => x_returnStatus,
1102: p_msg => l_errMsg,
1103: x_returnStatus => l_returnStatus);

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

1123: l_forward_move NUMBER;
1124: BEGIN
1125: FOR i IN 1..p_scheCount LOOP
1126: -- write parameter value to log file
1127: IF (l_logLevel <= wip_constants.trace_logging) THEN
1128: l_params(1).paramName := 'p_scheID';
1129: l_params(1).paramValue := p_rsa_rec(i).scheID;
1130: l_params(2).paramName := 'p_scheQty';
1131: l_params(2).paramValue := p_rsa_rec(i).scheQty;

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

1181: wop.quantity_in_queue + SUM(
1182: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1183: -1 * DECODE(p_rsa_rec(i).fmStep,
1184: 1, ROUND(p_rsa_rec(i).scheQty,
1185: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1186: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1187: DECODE(p_rsa_rec(i).toStep,
1188: 1, ROUND(p_rsa_rec(i).scheQty,
1189: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

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

1185: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1186: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1187: DECODE(p_rsa_rec(i).toStep,
1188: 1, ROUND(p_rsa_rec(i).scheQty,
1189: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1190: wop.quantity_running + SUM(
1191: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1192: -1 * DECODE(p_rsa_rec(i).fmStep,
1193: 2, ROUND(p_rsa_rec(i).scheQty,

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

1190: wop.quantity_running + SUM(
1191: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1192: -1 * DECODE(p_rsa_rec(i).fmStep,
1193: 2, ROUND(p_rsa_rec(i).scheQty,
1194: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1195: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1196: DECODE(p_rsa_rec(i).toStep,
1197: 2, ROUND(p_rsa_rec(i).scheQty,
1198: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

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

1194: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1195: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1196: DECODE(p_rsa_rec(i).toStep,
1197: 2, ROUND(p_rsa_rec(i).scheQty,
1198: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1199: wop.quantity_waiting_to_move + SUM(
1200: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1201: -1 * DECODE(p_rsa_rec(i).fmStep,
1202: 3, ROUND(p_rsa_rec(i).scheQty,

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

1199: wop.quantity_waiting_to_move + SUM(
1200: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1201: -1 * DECODE(p_rsa_rec(i).fmStep,
1202: 3, ROUND(p_rsa_rec(i).scheQty,
1203: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1204: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1205: DECODE(p_rsa_rec(i).toStep,
1206: 3, ROUND(p_rsa_rec(i).scheQty,
1207: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

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

1203: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1204: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1205: DECODE(p_rsa_rec(i).toStep,
1206: 3, ROUND(p_rsa_rec(i).scheQty,
1207: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1208: wop.quantity_rejected + SUM(
1209: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1210: -1*DECODE(p_rsa_rec(i).fmStep,
1211: 4, ROUND(p_rsa_rec(i).scheQty,

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

1208: wop.quantity_rejected + SUM(
1209: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1210: -1*DECODE(p_rsa_rec(i).fmStep,
1211: 4, ROUND(p_rsa_rec(i).scheQty,
1212: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1213: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1214: DECODE(p_rsa_rec(i).toStep,
1215: 4, ROUND(p_rsa_rec(i).scheQty,
1216: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

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

1212: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1213: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1214: DECODE(p_rsa_rec(i).toStep,
1215: 4, ROUND(p_rsa_rec(i).scheQty,
1216: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1217: wop.quantity_scrapped + SUM(
1218: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1219: -1*DECODE(p_rsa_rec(i).fmStep,
1220: 5, ROUND(p_rsa_rec(i).scheQty,

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

1217: wop.quantity_scrapped + SUM(
1218: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1219: -1*DECODE(p_rsa_rec(i).fmStep,
1220: 5, ROUND(p_rsa_rec(i).scheQty,
1221: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1222: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1223: DECODE(p_rsa_rec(i).toStep,
1224: 5, ROUND(p_rsa_rec(i).scheQty,
1225: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0))

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

1221: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1222: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1223: DECODE(p_rsa_rec(i).toStep,
1224: 5, ROUND(p_rsa_rec(i).scheQty,
1225: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0))
1226: FROM wip_operations wop1
1227: WHERE wop1.rowid = wop.rowid
1228: AND wop1.organization_id = p_rsa_rec(i).orgID
1229: AND wop1.wip_entity_id = p_rsa_rec(i).wipID

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

1239: AND (wop2.operation_seq_num = p_rsa_rec(i).fmOp
1240: OR wop2.operation_seq_num = p_rsa_rec(i).toOp));
1241:
1242: /* Enhancement 2864382*/
1243: IF(p_rsa_rec(i).fmStep = WIP_CONSTANTS.SCRAP AND p_rsa_rec(i).toStep = WIP_CONSTANTS.SCRAP) THEN
1244: l_forward_move := WIP_CONSTANTS.NO;
1245: IF(p_rsa_rec(i).fmOp < p_rsa_rec(i).toOp) THEN
1246: l_forward_move := WIP_CONSTANTS.YES;
1247: END IF;

Line 1244: l_forward_move := WIP_CONSTANTS.NO;

1240: OR wop2.operation_seq_num = p_rsa_rec(i).toOp));
1241:
1242: /* Enhancement 2864382*/
1243: IF(p_rsa_rec(i).fmStep = WIP_CONSTANTS.SCRAP AND p_rsa_rec(i).toStep = WIP_CONSTANTS.SCRAP) THEN
1244: l_forward_move := WIP_CONSTANTS.NO;
1245: IF(p_rsa_rec(i).fmOp < p_rsa_rec(i).toOp) THEN
1246: l_forward_move := WIP_CONSTANTS.YES;
1247: END IF;
1248:

Line 1246: l_forward_move := WIP_CONSTANTS.YES;

1242: /* Enhancement 2864382*/
1243: IF(p_rsa_rec(i).fmStep = WIP_CONSTANTS.SCRAP AND p_rsa_rec(i).toStep = WIP_CONSTANTS.SCRAP) THEN
1244: l_forward_move := WIP_CONSTANTS.NO;
1245: IF(p_rsa_rec(i).fmOp < p_rsa_rec(i).toOp) THEN
1246: l_forward_move := WIP_CONSTANTS.YES;
1247: END IF;
1248:
1249: UPDATE WIP_OPERATIONS wop
1250: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +

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

1248:
1249: UPDATE WIP_OPERATIONS wop
1250: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1251: DECODE(l_forward_move,
1252: WIP_CONSTANTS.YES,p_rsa_rec(i).scheQty,
1253: WIP_CONSTANTS.NO,-1 * p_rsa_rec(i).scheQty,
1254: 0)
1255: WHERE wop.rowid in
1256: (SELECT wop1.rowid

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

1249: UPDATE WIP_OPERATIONS wop
1250: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1251: DECODE(l_forward_move,
1252: WIP_CONSTANTS.YES,p_rsa_rec(i).scheQty,
1253: WIP_CONSTANTS.NO,-1 * p_rsa_rec(i).scheQty,
1254: 0)
1255: WHERE wop.rowid in
1256: (SELECT wop1.rowid
1257: FROM WIP_OPERATIONS wop1

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

1259: AND wop1.wip_entity_id = p_rsa_rec(i).wipID
1260: AND wop1.repetitive_schedule_id = p_rsa_rec(i).scheID
1261: AND wop1.operation_seq_num > LEAST(p_rsa_rec(i).fmOp,p_rsa_rec(i).toOp)
1262: AND wop1.operation_seq_num <= GREATEST(p_rsa_rec(i).fmOp,p_rsa_rec(i).toOp));
1263: ELSIF(p_rsa_rec(i).fmStep=WIP_CONSTANTS.SCRAP OR p_rsa_rec(i).toStep=WIP_CONSTANTS.SCRAP) THEN
1264: UPDATE WIP_OPERATIONS wop
1265: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1266: DECODE(p_rsa_rec(i).toStep,
1267: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).scheQty,

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

1263: ELSIF(p_rsa_rec(i).fmStep=WIP_CONSTANTS.SCRAP OR p_rsa_rec(i).toStep=WIP_CONSTANTS.SCRAP) THEN
1264: UPDATE WIP_OPERATIONS wop
1265: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1266: DECODE(p_rsa_rec(i).toStep,
1267: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).scheQty,
1268: 0) +
1269: DECODE(p_rsa_rec(i).fmStep,
1270: WIP_CONSTANTS.SCRAP,-1*p_rsa_rec(i).scheQty,
1271: 0)

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

1266: DECODE(p_rsa_rec(i).toStep,
1267: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).scheQty,
1268: 0) +
1269: DECODE(p_rsa_rec(i).fmStep,
1270: WIP_CONSTANTS.SCRAP,-1*p_rsa_rec(i).scheQty,
1271: 0)
1272: WHERE wop.rowid in
1273: (SELECT wop1.rowid
1274: FROM WIP_OPERATIONS wop1

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

1275: WHERE wop1.organization_id = p_rsa_rec(i).orgID
1276: AND wop1.wip_entity_id = p_rsa_rec(i).wipID
1277: AND wop1.repetitive_schedule_id = p_rsa_rec(i).scheID
1278: AND wop1.operation_seq_num > DECODE(p_rsa_rec(i).fmStep,
1279: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).fmOp,
1280: p_rsa_rec(i).toOp));
1281: END IF;
1282:
1283:

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

1285:
1286: x_returnStatus := fnd_api.g_ret_sts_success;
1287:
1288: -- write to the log file
1289: IF (l_logLevel <= wip_constants.trace_logging) THEN
1290: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_rs',
1291: p_procReturnStatus => x_returnStatus,
1292: p_msg => 'procedure complete',
1293: x_returnStatus => l_returnStatus);

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

1297: WHEN others THEN
1298: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1299: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1300:
1301: IF (l_logLevel <= wip_constants.trace_logging) THEN
1302: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_rs',
1303: p_procReturnStatus => x_returnStatus,
1304: p_msg => l_errMsg,
1305: x_returnStatus => l_returnStatus);

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

1325: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1326:
1327: BEGIN
1328: -- write parameter values to log file
1329: IF (l_logLevel <= wip_constants.trace_logging) THEN
1330: l_params(1).paramName := 'p_txn_id';
1331: l_params(1).paramValue := p_txn_id;
1332: l_params(2).paramName := 'p_group_id';
1333: l_params(2).paramValue := p_gib.group_id;

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

1397:
1398: x_returnStatus := fnd_api.g_ret_sts_success;
1399:
1400: -- write to the log file
1401: IF (l_logLevel <= wip_constants.trace_logging) THEN
1402: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wipops',
1403: p_procReturnStatus => x_returnStatus,
1404: p_msg => 'procedure complete',
1405: x_returnStatus => l_returnStatus);

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

1409: WHEN OTHERS THEN
1410: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1411: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1412:
1413: IF (l_logLevel <= wip_constants.trace_logging) THEN
1414: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wipops',
1415: p_procReturnStatus => x_returnStatus,
1416: p_msg => l_errMsg,
1417: x_returnStatus => l_returnStatus);

Line 1455: -1,WIP_CONSTANTS.normal_txn,

1451: 1,1,0,0,-1,0) past_timeout,
1452: NVL(overcompletion_primary_qty,0) oc_pri_qty,
1453: DECODE(NVL(overcompletion_primary_qty,-1),
1454: -1,DECODE(NVL(overcompletion_transaction_id,-1),
1455: -1,WIP_CONSTANTS.normal_txn,
1456: WIP_CONSTANTS.child_txn),
1457: WIP_CONSTANTS.parent_txn) oc_txn_type,
1458: transaction_type txn_type,
1459: transaction_date txn_date

Line 1456: WIP_CONSTANTS.child_txn),

1452: NVL(overcompletion_primary_qty,0) oc_pri_qty,
1453: DECODE(NVL(overcompletion_primary_qty,-1),
1454: -1,DECODE(NVL(overcompletion_transaction_id,-1),
1455: -1,WIP_CONSTANTS.normal_txn,
1456: WIP_CONSTANTS.child_txn),
1457: WIP_CONSTANTS.parent_txn) oc_txn_type,
1458: transaction_type txn_type,
1459: transaction_date txn_date
1460: FROM wip_move_txn_interface

Line 1457: WIP_CONSTANTS.parent_txn) oc_txn_type,

1453: DECODE(NVL(overcompletion_primary_qty,-1),
1454: -1,DECODE(NVL(overcompletion_transaction_id,-1),
1455: -1,WIP_CONSTANTS.normal_txn,
1456: WIP_CONSTANTS.child_txn),
1457: WIP_CONSTANTS.parent_txn) oc_txn_type,
1458: transaction_type txn_type,
1459: transaction_date txn_date
1460: FROM wip_move_txn_interface
1461: WHERE group_id = p_group_id

Line 1463: AND process_phase = WIP_CONSTANTS.MOVE_PROC

1459: transaction_date txn_date
1460: FROM wip_move_txn_interface
1461: WHERE group_id = p_group_id
1462: AND TRUNC(transaction_date) = TRUNC(p_txn_date)
1463: AND process_phase = WIP_CONSTANTS.MOVE_PROC
1464: AND process_status = WIP_CONSTANTS.RUNNING
1465: AND entity_type = WIP_CONSTANTS.REPETITIVE
1466: ORDER BY transaction_date, organization_id, wip_entity_id, line_id,
1467: fm_operation_seq_num, to_operation_seq_num,

Line 1464: AND process_status = WIP_CONSTANTS.RUNNING

1460: FROM wip_move_txn_interface
1461: WHERE group_id = p_group_id
1462: AND TRUNC(transaction_date) = TRUNC(p_txn_date)
1463: AND process_phase = WIP_CONSTANTS.MOVE_PROC
1464: AND process_status = WIP_CONSTANTS.RUNNING
1465: AND entity_type = WIP_CONSTANTS.REPETITIVE
1466: ORDER BY transaction_date, organization_id, wip_entity_id, line_id,
1467: fm_operation_seq_num, to_operation_seq_num,
1468: fm_intraoperation_step_type, to_intraoperation_step_type,

Line 1465: AND entity_type = WIP_CONSTANTS.REPETITIVE

1461: WHERE group_id = p_group_id
1462: AND TRUNC(transaction_date) = TRUNC(p_txn_date)
1463: AND process_phase = WIP_CONSTANTS.MOVE_PROC
1464: AND process_status = WIP_CONSTANTS.RUNNING
1465: AND entity_type = WIP_CONSTANTS.REPETITIVE
1466: ORDER BY transaction_date, organization_id, wip_entity_id, line_id,
1467: fm_operation_seq_num, to_operation_seq_num,
1468: fm_intraoperation_step_type, to_intraoperation_step_type,
1469: creation_date;

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

1483: l_msg_data VARCHAR2(2000);
1484: l_propagate_job_change_to_po NUMBER;
1485: BEGIN
1486: -- write parameter value to log file
1487: IF (l_logLevel <= wip_constants.trace_logging) THEN
1488: l_params(1).paramName := 'p_group_id';
1489: l_params(1).paramValue := p_gib.group_id;
1490: l_params(2).paramName := 'p_timeout';
1491: l_params(2).paramValue := p_gib.time_out;

Line 1533: p_fm_form => WIP_CONSTANTS.NO,

1529: p_to_op => l_rs_txn.to_op,
1530: p_to_step => l_rs_txn.to_step,
1531: p_oc_txn_type => l_rs_txn.oc_txn_type,
1532: p_txnType => l_rs_txn.txn_type,
1533: p_fm_form => WIP_CONSTANTS.NO,
1534: p_comp_alloc => WIP_CONSTANTS.NO,
1535: p_txn_date => l_rs_txn.txn_date, /* Bug 5373061 */
1536: x_proc_status => l_proc_status,
1537: x_sche_count => l_sche_count,

Line 1534: p_comp_alloc => WIP_CONSTANTS.NO,

1530: p_to_step => l_rs_txn.to_step,
1531: p_oc_txn_type => l_rs_txn.oc_txn_type,
1532: p_txnType => l_rs_txn.txn_type,
1533: p_fm_form => WIP_CONSTANTS.NO,
1534: p_comp_alloc => WIP_CONSTANTS.NO,
1535: p_txn_date => l_rs_txn.txn_date, /* Bug 5373061 */
1536: x_proc_status => l_proc_status,
1537: x_sche_count => l_sche_count,
1538: x_rsa => l_rsa,

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

1536: x_proc_status => l_proc_status,
1537: x_sche_count => l_sche_count,
1538: x_rsa => l_rsa,
1539: x_returnStatus => x_returnStatus);
1540: IF (l_logLevel <= wip_constants.full_logging) THEN
1541: wip_logger.log(p_msg => 'l_proc_status = ' || l_proc_status,
1542: x_returnStatus => l_returnStatus);
1543: wip_logger.log(p_msg => 'l_sche_count = ' || l_sche_count,
1544: x_returnStatus => l_returnStatus);

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

1543: wip_logger.log(p_msg => 'l_sche_count = ' || l_sche_count,
1544: x_returnStatus => l_returnStatus);
1545: END IF;
1546:
1547: IF(l_proc_status = WIP_CONSTANTS.RUNNING) THEN
1548:
1549: FOR i IN 1..l_sche_count LOOP
1550: INSERT INTO wip_move_txn_allocations
1551: (transaction_id,

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

1576: DECODE(p_gib.request_id,-1,NULL,SYSDATE),
1577: l_rs_txn.txn_qty * l_rsa(i).scheQty /
1578: l_rs_txn.primary_qty, -- transaction_quantity
1579: ROUND(l_rsa(i).scheQty,
1580: WIP_CONSTANTS.INV_MAX_PRECISION)); -- primary_quantity
1581: END LOOP; --END for loop
1582:
1583: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN
1584:

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

1579: ROUND(l_rsa(i).scheQty,
1580: WIP_CONSTANTS.INV_MAX_PRECISION)); -- primary_quantity
1581: END LOOP; --END for loop
1582:
1583: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN
1584:
1585: -- update qty in the queue step of the from operation
1586: -- for child move txns.
1587: update_wipops(p_txn_id => l_rs_txn.txn_id,

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

1594: END IF;
1595:
1596: END IF; -- child txns
1597:
1598: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.parent_txn) THEN
1599: -- all procedure in this loop is pretty much for child record
1600: -- IF it is over completion/move txn, insert child record to WMTI
1601: insert_alloc_child(p_org_id => l_rs_txn.org_id,
1602: p_scheID => l_rsa(1).scheID,

Line 1613: SET process_status = WIP_CONSTANTS.PENDING,

1609: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1610:
1611: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1612: UPDATE wip_move_txn_interface
1613: SET process_status = WIP_CONSTANTS.PENDING,
1614: group_id = NULL,
1615: transaction_id = NULL
1616: WHERE transaction_id = l_rs_txn.txn_id
1617: AND group_id = p_gib.group_id;

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

1644: l_update_rsa(1).orgID := l_rs_txn.org_id;
1645: l_update_rsa(1).wipID := l_rs_txn.wip_id;
1646: l_update_rsa(1).fmOp := l_oc_fm_op;
1647: l_update_rsa(1).toOp := l_rs_txn.fm_op;
1648: l_update_rsa(1).fmStep := WIP_CONSTANTS.QUEUE;
1649: l_update_rsa(1).toStep := l_rs_txn.fm_step;
1650:
1651: update_wo_rs(p_scheCount => 1,
1652: p_rsa_rec => l_update_rsa,

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

1667: INTO l_propagate_job_change_to_po
1668: FROM wip_parameters
1669: WHERE organization_id = l_rs_txn.org_id;
1670:
1671: IF(l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN
1672: wip_osp.updatePOReqQuantity(
1673: p_job_id => l_rs_txn.wip_id,
1674: p_repetitive_id => l_rsa(1).scheID,
1675: p_org_id => l_rs_txn.org_id,

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

1683: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1684: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
1685: raise fnd_api.g_exc_unexpected_error;
1686: END IF; -- l_return_status
1687: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES
1688: END IF; -- l_rs_txn.oc_pri_qty <> 0 and customer have PO FPJ
1689: END IF; -- IF parent_txn
1690:
1691: -- prepare data before calling update_wo_rs

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

1718:
1719: ELSIF(l_proc_status = TVE_OVERCOMPLETION_MISMATCH OR
1720: l_proc_status = TVE_NO_MOVE_ALLOC) THEN
1721:
1722: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1723: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1724: UPDATE wip_move_txn_interface
1725: SET process_status = WIP_CONSTANTS.PENDING,
1726: group_id = NULL,

Line 1725: SET process_status = WIP_CONSTANTS.PENDING,

1721:
1722: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1723: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1724: UPDATE wip_move_txn_interface
1725: SET process_status = WIP_CONSTANTS.PENDING,
1726: group_id = NULL,
1727: transaction_id = NULL
1728: WHERE transaction_id = l_rs_txn.txn_id
1729: AND group_id = p_gib.group_id;

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

1743: l_errMsg := 'available qty is not enough to fullfill move txn';
1744: raise fnd_api.g_exc_unexpected_error;
1745: END IF;
1746:
1747: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
1748:
1749: -- update move_interface table
1750: UPDATE wip_move_txn_interface
1751: SET process_status = WIP_CONSTANTS.ERROR

Line 1751: SET process_status = WIP_CONSTANTS.ERROR

1747: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
1748:
1749: -- update move_interface table
1750: UPDATE wip_move_txn_interface
1751: SET process_status = WIP_CONSTANTS.ERROR
1752: WHERE transaction_id = l_rs_txn.txn_id
1753: AND group_id = p_gib.group_id;
1754:
1755: l_errMsg := 'wip_movProc_priv.schedule_alloc failed';

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

1764: -- Fixed bug 4406536. We should error out only problematic record and
1765: -- continue to process next record.
1766: EXCEPTION
1767: WHEN fnd_api.g_exc_unexpected_error THEN
1768: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1769: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1770: UPDATE wip_move_txn_interface
1771: SET process_status = WIP_CONSTANTS.PENDING,
1772: group_id = NULL,

Line 1771: SET process_status = WIP_CONSTANTS.PENDING,

1767: WHEN fnd_api.g_exc_unexpected_error THEN
1768: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1769: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1770: UPDATE wip_move_txn_interface
1771: SET process_status = WIP_CONSTANTS.PENDING,
1772: group_id = NULL,
1773: transaction_id = NULL
1774: WHERE transaction_id = l_rs_txn.txn_id
1775: AND group_id = p_gib.group_id;

Line 1778: SET process_status = WIP_CONSTANTS.ERROR

1774: WHERE transaction_id = l_rs_txn.txn_id
1775: AND group_id = p_gib.group_id;
1776: ELSE -- already time out
1777: UPDATE wip_move_txn_interface
1778: SET process_status = WIP_CONSTANTS.ERROR
1779: WHERE transaction_id = l_rs_txn.txn_id
1780: AND group_id = p_gib.group_id;
1781:
1782: -- Get error from message stack

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

1835: END IF;
1836: x_returnStatus := fnd_api.g_ret_sts_success;
1837:
1838: -- write to the log file
1839: IF (l_logLevel <= wip_constants.trace_logging) THEN
1840: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',
1841: p_procReturnStatus => x_returnStatus,
1842: p_msg => 'procedure complete',
1843: x_returnStatus => l_returnStatus);

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

1852: CLOSE c_rs_txn;
1853: END IF;
1854: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1855:
1856: IF (l_logLevel <= wip_constants.trace_logging) THEN
1857: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',
1858: p_procReturnStatus => x_returnStatus,
1859: p_msg => l_errMsg,
1860: x_returnStatus => l_returnStatus);

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

1865: END IF;
1866: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1867: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1868:
1869: IF (l_logLevel <= wip_constants.trace_logging) THEN
1870: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',
1871: p_procReturnStatus => x_returnStatus,
1872: p_msg => l_errMsg,
1873: x_returnStatus => l_returnStatus);

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

1900: l_forward_move NUMBER;
1901:
1902: BEGIN
1903: -- write parameter value to log file
1904: IF (l_logLevel <= wip_constants.trace_logging) THEN
1905: l_params(1).paramName := 'p_txn_date';
1906: l_params(1).paramValue := p_txn_date;
1907: l_params(2).paramName := 'p_fm_op';
1908: l_params(2).paramValue := p_fm_op;

Line 1954: WIP_CONSTANTS.INV_MAX_PRECISION),

1950: wop.quantity_in_queue + SUM(
1951: DECODE(wop.operation_seq_num,
1952: p_fm_op, -1 * DECODE(p_fm_step,
1953: 1,ROUND(p_qty,
1954: WIP_CONSTANTS.INV_MAX_PRECISION),
1955: 0),
1956: 0) +
1957: DECODE(wop.operation_seq_num,
1958: p_to_op,DECODE(p_to_step,

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

1955: 0),
1956: 0) +
1957: DECODE(wop.operation_seq_num,
1958: p_to_op,DECODE(p_to_step,
1959: 1,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
1960: 0),
1961: 0)),
1962: wop.quantity_running + SUM(
1963: DECODE(wop.operation_seq_num,

Line 1966: WIP_CONSTANTS.INV_MAX_PRECISION),

1962: wop.quantity_running + SUM(
1963: DECODE(wop.operation_seq_num,
1964: p_fm_op, -1 * DECODE(p_fm_step,
1965: 2,ROUND(p_qty,
1966: WIP_CONSTANTS.INV_MAX_PRECISION),
1967: 0),
1968: 0) +
1969: DECODE(wop.operation_seq_num,
1970: p_to_op,DECODE(p_to_step,

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

1967: 0),
1968: 0) +
1969: DECODE(wop.operation_seq_num,
1970: p_to_op,DECODE(p_to_step,
1971: 2,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
1972: 0),
1973: 0)),
1974: wop.quantity_waiting_to_move + SUM(
1975: DECODE(wop.operation_seq_num,

Line 1978: WIP_CONSTANTS.INV_MAX_PRECISION),

1974: wop.quantity_waiting_to_move + SUM(
1975: DECODE(wop.operation_seq_num,
1976: p_fm_op, -1 * DECODE(p_fm_step,
1977: 3,ROUND(p_qty,
1978: WIP_CONSTANTS.INV_MAX_PRECISION),
1979: 0),
1980: 0) +
1981: DECODE(wop.operation_seq_num,
1982: p_to_op,DECODE(p_to_step,

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

1979: 0),
1980: 0) +
1981: DECODE(wop.operation_seq_num,
1982: p_to_op,DECODE(p_to_step,
1983: 3,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
1984: 0),
1985: 0)),
1986: wop.quantity_rejected + SUM(
1987: DECODE(wop.operation_seq_num,

Line 1990: WIP_CONSTANTS.INV_MAX_PRECISION),

1986: wop.quantity_rejected + SUM(
1987: DECODE(wop.operation_seq_num,
1988: p_fm_op,-1 * DECODE(p_fm_step,
1989: 4,ROUND(p_qty,
1990: WIP_CONSTANTS.INV_MAX_PRECISION),
1991: 0),
1992: 0) +
1993: DECODE(wop.operation_seq_num,
1994: p_to_op,DECODE(p_to_step,

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

1991: 0),
1992: 0) +
1993: DECODE(wop.operation_seq_num,
1994: p_to_op,DECODE(p_to_step,
1995: 4,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
1996: 0),
1997: 0)),
1998: wop.quantity_scrapped + SUM(
1999: DECODE(wop.operation_seq_num,

Line 2002: WIP_CONSTANTS.INV_MAX_PRECISION),

1998: wop.quantity_scrapped + SUM(
1999: DECODE(wop.operation_seq_num,
2000: p_fm_op,-1 * DECODE(p_fm_step,
2001: 5,ROUND(p_qty,
2002: WIP_CONSTANTS.INV_MAX_PRECISION),
2003: 0),
2004: 0) +
2005: DECODE(wop.operation_seq_num,
2006: p_to_op,DECODE(p_to_step,

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

2003: 0),
2004: 0) +
2005: DECODE(wop.operation_seq_num,
2006: p_to_op,DECODE(p_to_step,
2007: 5,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
2008: 0),
2009: 0))
2010: FROM wip_operations wop1
2011: WHERE wop1.rowid = wop.rowid

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

2022: OR wop2.operation_seq_num = p_to_op));
2023:
2024: /*Enh#2864382.Update wip_operations.cumulative_scrap_quantity after each
2025: scrap or return from scrap txn*/
2026: IF(p_fm_step = WIP_CONSTANTS.SCRAP AND p_to_step = WIP_CONSTANTS.SCRAP) THEN
2027: l_forward_move := WIP_CONSTANTS.NO;
2028: IF(p_fm_op 2029: l_forward_move := WIP_CONSTANTS.YES;
2030: END IF;

Line 2027: l_forward_move := WIP_CONSTANTS.NO;

2023:
2024: /*Enh#2864382.Update wip_operations.cumulative_scrap_quantity after each
2025: scrap or return from scrap txn*/
2026: IF(p_fm_step = WIP_CONSTANTS.SCRAP AND p_to_step = WIP_CONSTANTS.SCRAP) THEN
2027: l_forward_move := WIP_CONSTANTS.NO;
2028: IF(p_fm_op 2029: l_forward_move := WIP_CONSTANTS.YES;
2030: END IF;
2031:

Line 2029: l_forward_move := WIP_CONSTANTS.YES;

2025: scrap or return from scrap txn*/
2026: IF(p_fm_step = WIP_CONSTANTS.SCRAP AND p_to_step = WIP_CONSTANTS.SCRAP) THEN
2027: l_forward_move := WIP_CONSTANTS.NO;
2028: IF(p_fm_op 2029: l_forward_move := WIP_CONSTANTS.YES;
2030: END IF;
2031:
2032: UPDATE WIP_OPERATIONS wo
2033: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +

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

2031:
2032: UPDATE WIP_OPERATIONS wo
2033: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2034: DECODE(l_forward_move,
2035: WIP_CONSTANTS.YES, -1*p_qty,
2036: WIP_CONSTANTS.NO, p_qty,
2037: 0)
2038: WHERE wo.rowid in
2039: ( SELECT wo1.rowid

Line 2036: WIP_CONSTANTS.NO, p_qty,

2032: UPDATE WIP_OPERATIONS wo
2033: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2034: DECODE(l_forward_move,
2035: WIP_CONSTANTS.YES, -1*p_qty,
2036: WIP_CONSTANTS.NO, p_qty,
2037: 0)
2038: WHERE wo.rowid in
2039: ( SELECT wo1.rowid
2040: FROM WIP_OPERATIONS wo1

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

2041: WHERE wo1.organization_id = p_org_id
2042: AND wo1.wip_entity_id = p_wip_id
2043: AND wo1.operation_seq_num > LEAST(p_fm_op,p_to_op)
2044: AND wo1.operation_seq_num <= GREATEST(p_fm_op,p_to_op));
2045: ELSIF(p_fm_step=WIP_CONSTANTS.SCRAP OR p_to_step=WIP_CONSTANTS.SCRAP)THEN
2046: UPDATE WIP_OPERATIONS wo
2047: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2048: DECODE(p_to_step,
2049: WIP_CONSTANTS.SCRAP,p_qty,

Line 2049: WIP_CONSTANTS.SCRAP,p_qty,

2045: ELSIF(p_fm_step=WIP_CONSTANTS.SCRAP OR p_to_step=WIP_CONSTANTS.SCRAP)THEN
2046: UPDATE WIP_OPERATIONS wo
2047: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2048: DECODE(p_to_step,
2049: WIP_CONSTANTS.SCRAP,p_qty,
2050: 0) +
2051: DECODE(p_fm_step,
2052: WIP_CONSTANTS.SCRAP,-1*p_qty,
2053: 0)

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

2048: DECODE(p_to_step,
2049: WIP_CONSTANTS.SCRAP,p_qty,
2050: 0) +
2051: DECODE(p_fm_step,
2052: WIP_CONSTANTS.SCRAP,-1*p_qty,
2053: 0)
2054: WHERE wo.rowid in
2055: (SELECT wo1.rowid
2056: FROM WIP_OPERATIONS wo1

Line 2060: WIP_CONSTANTS.SCRAP,p_fm_op,

2056: FROM WIP_OPERATIONS wo1
2057: WHERE wo1.organization_id = p_org_id
2058: AND wo1.wip_entity_id = p_wip_id
2059: AND wo1.operation_seq_num > DECODE(p_fm_step,
2060: WIP_CONSTANTS.SCRAP,p_fm_op,
2061: p_to_op));
2062: END IF;
2063:
2064: x_returnStatus := fnd_api.g_ret_sts_success;

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

2063:
2064: x_returnStatus := fnd_api.g_ret_sts_success;
2065:
2066: -- write to the log file
2067: IF (l_logLevel <= wip_constants.trace_logging) THEN
2068: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_dj',
2069: p_procReturnStatus => x_returnStatus,
2070: p_msg => 'procedure complete',
2071: x_returnStatus => l_returnStatus);

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

2075: WHEN others THEN
2076: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2077: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2078:
2079: IF (l_logLevel <= wip_constants.trace_logging) THEN
2080: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_dj',
2081: p_procReturnStatus => x_returnStatus,
2082: p_msg => l_errMsg,
2083: x_returnStatus => l_returnStatus);

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

2111: 1,1,0) past_timeout,
2112: NVL(wmti.overcompletion_primary_qty,0) oc_pri_qty,
2113: DECODE(NVL(wmti.overcompletion_primary_qty,-1),
2114: -1,DECODE(NVL(wmti.overcompletion_transaction_id,-1),
2115: -1,WIP_CONSTANTS.normal_txn, WIP_CONSTANTS.child_txn)
2116: ,WIP_CONSTANTS.parent_txn) oc_txn_type,
2117: -- new columns added for serial location check
2118: wmti.transaction_type txn_type,
2119: wmti.primary_item_id item_id,

Line 2116: ,WIP_CONSTANTS.parent_txn) oc_txn_type,

2112: NVL(wmti.overcompletion_primary_qty,0) oc_pri_qty,
2113: DECODE(NVL(wmti.overcompletion_primary_qty,-1),
2114: -1,DECODE(NVL(wmti.overcompletion_transaction_id,-1),
2115: -1,WIP_CONSTANTS.normal_txn, WIP_CONSTANTS.child_txn)
2116: ,WIP_CONSTANTS.parent_txn) oc_txn_type,
2117: -- new columns added for serial location check
2118: wmti.transaction_type txn_type,
2119: wmti.primary_item_id item_id,
2120: NVL(wdj.serialization_start_op, 0) sn_start_op,

Line 2127: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2123: wip_discrete_jobs wdj
2124: WHERE wmti.wip_entity_id = wdj.wip_entity_id
2125: AND wmti.group_id = p_group_id
2126: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
2127: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2128: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2129: /* Now checks for lotbased entity type also */
2130: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2131: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)

Line 2128: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2124: WHERE wmti.wip_entity_id = wdj.wip_entity_id
2125: AND wmti.group_id = p_group_id
2126: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
2127: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2128: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2129: /* Now checks for lotbased entity type also */
2130: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2131: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)
2132: ORDER BY wmti.transaction_date,

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

2126: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
2127: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2128: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2129: /* Now checks for lotbased entity type also */
2130: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2131: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)
2132: ORDER BY wmti.transaction_date,
2133: wmti.organization_id,
2134: wmti.wip_entity_id,

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

2127: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2128: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2129: /* Now checks for lotbased entity type also */
2130: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2131: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)
2132: ORDER BY wmti.transaction_date,
2133: wmti.organization_id,
2134: wmti.wip_entity_id,
2135: wmti.processing_order,

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

2143: p_move_id NUMBER) IS
2144:
2145: SELECT msn.serial_number serial,
2146: NVL(msn.operation_seq_num, p_start_op) sn_op,
2147: NVL(msn.intraoperation_step_type, WIP_CONSTANTS.QUEUE) sn_step
2148: FROM mtl_serial_numbers msn,
2149: wip_serial_move_interface wsmi,
2150: wip_move_txn_interface wmti
2151: WHERE msn.inventory_item_id = wmti.primary_item_id

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

2183: l_msg_data VARCHAR2(2000);
2184: l_propagate_job_change_to_po NUMBER;
2185: BEGIN
2186: -- write parameter value to log file
2187: IF (l_logLevel <= wip_constants.trace_logging) THEN
2188: l_params(1).paramName := 'p_group_id';
2189: l_params(1).paramValue := p_gib.group_id;
2190: l_params(2).paramName := 'p_timeout';
2191: l_params(2).paramValue := p_gib.time_out;

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

2224: p_move_id => l_dj_txn.txn_id) LOOP
2225:
2226: -- get MSN.OPERATION_SEQ_NUM and MSN.INTRAOPERATION_STEP_TYPE
2227:
2228: IF(l_dj_txn.txn_type IN (WIP_CONSTANTS.COMP_TXN,
2229: WIP_CONSTANTS.MOVE_TXN) AND
2230: (l_ser_loc.sn_op <> l_dj_txn.fm_op OR
2231: l_ser_loc.sn_step <> l_dj_txn.fm_step)) THEN
2232: fnd_message.set_name('WIP', 'WIP_SERIAL_LOCATION_MISSMATCH');

Line 2229: WIP_CONSTANTS.MOVE_TXN) AND

2225:
2226: -- get MSN.OPERATION_SEQ_NUM and MSN.INTRAOPERATION_STEP_TYPE
2227:
2228: IF(l_dj_txn.txn_type IN (WIP_CONSTANTS.COMP_TXN,
2229: WIP_CONSTANTS.MOVE_TXN) AND
2230: (l_ser_loc.sn_op <> l_dj_txn.fm_op OR
2231: l_ser_loc.sn_step <> l_dj_txn.fm_step)) THEN
2232: fnd_message.set_name('WIP', 'WIP_SERIAL_LOCATION_MISSMATCH');
2233: fnd_msg_pub.add;

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

2236: ELSE -- serial location is valid to move
2237: -- If user move back to Queue of serialization start op, we clear
2238: -- operation_seq_num and intraoperation_step_type in MSNT
2239: IF (l_dj_txn.to_op = l_dj_txn.sn_start_op AND
2240: l_dj_txn.to_step = WIP_CONSTANTS.QUEUE) THEN
2241: l_opSeq := null;
2242: l_step := null;
2243: ELSE
2244: l_opSeq := l_dj_txn.to_op;

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

2278: WHERE wop.organization_id = l_dj_txn.org_id
2279: AND wop.wip_entity_id = l_dj_txn.wip_id
2280: AND wop.operation_seq_num = l_dj_txn.fm_op;
2281:
2282: IF(l_dj_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN
2283: -- update qty in queue step for child txn
2284: update_wipops(p_txn_id => l_dj_txn.txn_id,
2285: p_gib => p_gib,
2286: x_returnStatus => x_returnStatus);

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

2291: END IF; -- check return status
2292:
2293: ELSE -- IF it is parent or normal txn, validate qty
2294:
2295: IF(l_dj_txn.fm_step = WIP_CONSTANTS.QUEUE) THEN
2296: IF(l_dj_txn.qty > l_queue_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2297: l_notenough := TRUE;
2298: END IF;
2299: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.RUN) THEN

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

2295: IF(l_dj_txn.fm_step = WIP_CONSTANTS.QUEUE) THEN
2296: IF(l_dj_txn.qty > l_queue_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2297: l_notenough := TRUE;
2298: END IF;
2299: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.RUN) THEN
2300: IF(l_dj_txn.qty > l_run_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2301: l_notenough := TRUE;
2302: END IF;
2303: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.TOMOVE) THEN

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

2299: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.RUN) THEN
2300: IF(l_dj_txn.qty > l_run_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2301: l_notenough := TRUE;
2302: END IF;
2303: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.TOMOVE) THEN
2304: IF(l_dj_txn.qty > l_tomove_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2305: l_notenough := TRUE;
2306: END IF;
2307: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.REJECT) THEN

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

2303: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.TOMOVE) THEN
2304: IF(l_dj_txn.qty > l_tomove_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2305: l_notenough := TRUE;
2306: END IF;
2307: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.REJECT) THEN
2308: IF(l_dj_txn.qty > l_reject_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2309: l_notenough := TRUE;
2310: END IF;
2311: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.SCRAP) THEN

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

2307: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.REJECT) THEN
2308: IF(l_dj_txn.qty > l_reject_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2309: l_notenough := TRUE;
2310: END IF;
2311: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.SCRAP) THEN
2312: IF(l_dj_txn.qty > l_scrap_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2313: l_notenough := TRUE;
2314: END IF;
2315: END IF; -- fm_step check

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

2315: END IF; -- fm_step check
2316: END IF; -- child txn check
2317:
2318: IF(l_notenough) THEN
2319: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2320: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2321: UPDATE wip_move_txn_interface
2322: SET process_status = WIP_CONSTANTS.PENDING,
2323: group_id = NULL,

Line 2322: SET process_status = WIP_CONSTANTS.PENDING,

2318: IF(l_notenough) THEN
2319: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2320: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2321: UPDATE wip_move_txn_interface
2322: SET process_status = WIP_CONSTANTS.PENDING,
2323: group_id = NULL,
2324: transaction_id = NULL
2325: WHERE transaction_id = l_dj_txn.txn_id
2326: AND group_id = p_gib.group_id;

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

2332: fnd_msg_pub.add;
2333: l_errMsg := 'available qty is not enough to fullfill move txn';
2334: raise fnd_api.g_exc_unexpected_error;
2335: ELSE -- enough qty to move
2336: IF(l_dj_txn.oc_txn_type = WIP_CONSTANTS.parent_txn) THEN
2337:
2338: -- all procedure in this loop is pretty much for child record
2339: -- IF it is over completion/move txn, insert child record to WMTI
2340: insert_alloc_child(p_org_id => l_dj_txn.org_id,

Line 2351: SET process_status = WIP_CONSTANTS.PENDING,

2347:
2348: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2349: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2350: UPDATE wip_move_txn_interface
2351: SET process_status = WIP_CONSTANTS.PENDING,
2352: group_id = NULL,
2353: transaction_id = NULL
2354: WHERE transaction_id = l_dj_txn.txn_id
2355: AND group_id = p_gib.group_id;

Line 2376: p_fm_step => WIP_CONSTANTS.QUEUE,

2372:
2373: -- update wip_operations for child move txns
2374: update_wo_dj(p_gib => p_gib,
2375: p_fm_op => l_oc_fm_op,
2376: p_fm_step => WIP_CONSTANTS.QUEUE,
2377: p_to_op => l_dj_txn.fm_op,
2378: p_to_step => l_dj_txn.fm_step,
2379: p_qty => l_dj_txn.oc_pri_qty,
2380: p_org_id => l_dj_txn.org_id,

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

2397: INTO l_propagate_job_change_to_po
2398: FROM wip_parameters
2399: WHERE organization_id = l_dj_txn.org_id;
2400:
2401: IF(l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN
2402: wip_osp.updatePOReqQuantity(
2403: p_job_id => l_dj_txn.wip_id,
2404: p_org_id => l_dj_txn.org_id,
2405: p_changed_qty => l_dj_txn.oc_pri_qty,

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

2412: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2413: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
2414: raise fnd_api.g_exc_unexpected_error;
2415: END IF; -- x_returnStatus
2416: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES
2417: END IF; -- l_dj_txn.oc_pri_qty <> 0 and customer have PO FPJ
2418: END IF; -- IF parent_txn
2419:
2420: -- update wip_operations for parent and normal move txns

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

2443: -- Fixed bug 4406536. We should error out only problematic record and
2444: -- continue to process next record.
2445: EXCEPTION
2446: WHEN fnd_api.g_exc_unexpected_error THEN
2447: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2448: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2449: UPDATE wip_move_txn_interface
2450: SET process_status = WIP_CONSTANTS.PENDING,
2451: group_id = NULL,

Line 2450: SET process_status = WIP_CONSTANTS.PENDING,

2446: WHEN fnd_api.g_exc_unexpected_error THEN
2447: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2448: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2449: UPDATE wip_move_txn_interface
2450: SET process_status = WIP_CONSTANTS.PENDING,
2451: group_id = NULL,
2452: transaction_id = NULL
2453: WHERE transaction_id = l_dj_txn.txn_id
2454: AND group_id = p_gib.group_id;

Line 2457: SET process_status = WIP_CONSTANTS.ERROR

2453: WHERE transaction_id = l_dj_txn.txn_id
2454: AND group_id = p_gib.group_id;
2455: ELSE -- already time out
2456: UPDATE wip_move_txn_interface
2457: SET process_status = WIP_CONSTANTS.ERROR
2458: WHERE transaction_id = l_dj_txn.txn_id
2459: AND group_id = p_gib.group_id;
2460: -- Get error from message stack
2461: wip_utilities.get_message_stack(p_msg =>l_msg);

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

2508: END IF;
2509: x_returnStatus := fnd_api.g_ret_sts_success;
2510:
2511: -- write to the log file
2512: IF (l_logLevel <= wip_constants.trace_logging) THEN
2513: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',
2514: p_procReturnStatus => x_returnStatus,
2515: p_msg => 'procedure complete',
2516: x_returnStatus => l_returnStatus);

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

2523: CLOSE c_dj_txn;
2524: END IF;
2525: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2526:
2527: IF (l_logLevel <= wip_constants.trace_logging) THEN
2528: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',
2529: p_procReturnStatus => x_returnStatus,
2530: p_msg => l_errMsg,
2531: x_returnStatus => l_returnStatus);

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

2537: END IF;
2538: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2539: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2540:
2541: IF (l_logLevel <= wip_constants.trace_logging) THEN
2542: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',
2543: p_procReturnStatus => x_returnStatus,
2544: p_msg => l_errMsg,
2545: x_returnStatus => l_returnStatus);

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

2572: -- initialize l_move
2573: l_move := p_gib.move_profile;
2574:
2575: -- write parameter value to log file
2576: IF (l_logLevel <= wip_constants.trace_logging) THEN
2577: l_params(1).paramName := 'p_group_id';
2578: l_params(1).paramValue := p_gib.group_id;
2579: l_params(2).paramName := 'p_txn_date';
2580: l_params(2).paramValue := p_gib.txn_date;

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

2614: p_params => l_params,
2615: x_returnStatus => l_returnStatus);
2616: END IF;
2617:
2618: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
2619:
2620: /* Fix for FP bug 5246228 base bug 5227706:
2621: * Modified following query to consider autocharge
2622: * resources in previous operation for overcompletion cases */

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

2645: Changed < to <= in above condition */
2646:
2647: ELSE -- move_mode is background
2648:
2649: SELECT SUM(DECODE(transaction_type, WIP_CONSTANTS.COMP_TXN, 1, 0)),
2650: SUM(DECODE(transaction_type, WIP_CONSTANTS.RET_TXN, 1, 0))
2651: INTO l_completion,
2652: l_return
2653: FROM wip_move_txn_interface wmti

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

2646:
2647: ELSE -- move_mode is background
2648:
2649: SELECT SUM(DECODE(transaction_type, WIP_CONSTANTS.COMP_TXN, 1, 0)),
2650: SUM(DECODE(transaction_type, WIP_CONSTANTS.RET_TXN, 1, 0))
2651: INTO l_completion,
2652: l_return
2653: FROM wip_move_txn_interface wmti
2654: WHERE wmti.group_id = p_gib.group_id

Line 2656: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2652: l_return
2653: FROM wip_move_txn_interface wmti
2654: WHERE wmti.group_id = p_gib.group_id
2655: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2656: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2657: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2658:
2659: -- set completion and return flag
2660: IF(l_completion > 0) THEN

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

2653: FROM wip_move_txn_interface wmti
2654: WHERE wmti.group_id = p_gib.group_id
2655: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2656: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2657: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2658:
2659: -- set completion and return flag
2660: IF(l_completion > 0) THEN
2661: l_move.easyComplete := WIP_CONSTANTS.YES;

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

2657: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2658:
2659: -- set completion and return flag
2660: IF(l_completion > 0) THEN
2661: l_move.easyComplete := WIP_CONSTANTS.YES;
2662: ELSE
2663: l_move.easyComplete := WIP_CONSTANTS.NO;
2664: END IF;
2665:

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

2659: -- set completion and return flag
2660: IF(l_completion > 0) THEN
2661: l_move.easyComplete := WIP_CONSTANTS.YES;
2662: ELSE
2663: l_move.easyComplete := WIP_CONSTANTS.NO;
2664: END IF;
2665:
2666: IF(l_return > 0) THEN
2667: l_move.easyReturn := WIP_CONSTANTS.YES;

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

2663: l_move.easyComplete := WIP_CONSTANTS.NO;
2664: END IF;
2665:
2666: IF(l_return > 0) THEN
2667: l_move.easyReturn := WIP_CONSTANTS.YES;
2668: ELSE
2669: l_move.easyReturn := WIP_CONSTANTS.NO;
2670: END IF;
2671: /* Fix for bug 3902908: Added hints as per suggestion of appsperf team. */

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

2665:
2666: IF(l_return > 0) THEN
2667: l_move.easyReturn := WIP_CONSTANTS.YES;
2668: ELSE
2669: l_move.easyReturn := WIP_CONSTANTS.NO;
2670: END IF;
2671: /* Fix for bug 3902908: Added hints as per suggestion of appsperf team. */
2672: /* Fix for FP bug 5246228 base bug 5227706: Modified following query to consider autocharge
2673: resources in previous operation for overcompletion cases */

Line 2689: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2685: FROM wip_move_txn_interface wmti,
2686: wip_operation_resources wor
2687: WHERE wmti.group_id = p_gib.group_id
2688: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2689: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2690: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2691: AND wor.organization_id = wmti.organization_id
2692: AND wor.wip_entity_id = wmti.wip_entity_id
2693: AND ((wmti.overcompletion_primary_qty IS NULL

Line 2690: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2686: wip_operation_resources wor
2687: WHERE wmti.group_id = p_gib.group_id
2688: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2689: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2690: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2691: AND wor.organization_id = wmti.organization_id
2692: AND wor.wip_entity_id = wmti.wip_entity_id
2693: AND ((wmti.overcompletion_primary_qty IS NULL
2694: AND (wor.operation_seq_num BETWEEN wmti.fm_operation_seq_num

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

2703: END IF; -- move_mode is online
2704:
2705: -- set the rest of move_profile flag
2706: IF(l_mv_item > 0) THEN -- auto resource per item
2707: l_move.rsrcItem := WIP_CONSTANTS.YES;
2708: ELSE
2709: l_move.rsrcItem := WIP_CONSTANTS.NO;
2710: END IF;
2711:

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

2705: -- set the rest of move_profile flag
2706: IF(l_mv_item > 0) THEN -- auto resource per item
2707: l_move.rsrcItem := WIP_CONSTANTS.YES;
2708: ELSE
2709: l_move.rsrcItem := WIP_CONSTANTS.NO;
2710: END IF;
2711:
2712: IF(l_mv_lot > 0) THEN -- auto resource per lot
2713: l_move.rsrcLot := WIP_CONSTANTS.YES;

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

2709: l_move.rsrcItem := WIP_CONSTANTS.NO;
2710: END IF;
2711:
2712: IF(l_mv_lot > 0) THEN -- auto resource per lot
2713: l_move.rsrcLot := WIP_CONSTANTS.YES;
2714: ELSE
2715: l_move.rsrcLot := WIP_CONSTANTS.NO;
2716: END IF;
2717:

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

2711:
2712: IF(l_mv_lot > 0) THEN -- auto resource per lot
2713: l_move.rsrcLot := WIP_CONSTANTS.YES;
2714: ELSE
2715: l_move.rsrcLot := WIP_CONSTANTS.NO;
2716: END IF;
2717:
2718: IF(l_po_item > 0) THEN -- po requisition per item
2719: l_move.poReqItem := WIP_CONSTANTS.YES;

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

2715: l_move.rsrcLot := WIP_CONSTANTS.NO;
2716: END IF;
2717:
2718: IF(l_po_item > 0) THEN -- po requisition per item
2719: l_move.poReqItem := WIP_CONSTANTS.YES;
2720: ELSE
2721: l_move.poReqItem := WIP_CONSTANTS.NO;
2722: END IF;
2723:

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

2717:
2718: IF(l_po_item > 0) THEN -- po requisition per item
2719: l_move.poReqItem := WIP_CONSTANTS.YES;
2720: ELSE
2721: l_move.poReqItem := WIP_CONSTANTS.NO;
2722: END IF;
2723:
2724: IF(l_po_lot > 0) THEN -- po requisition per lot
2725: l_move.poReqLot := WIP_CONSTANTS.YES;

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

2721: l_move.poReqItem := WIP_CONSTANTS.NO;
2722: END IF;
2723:
2724: IF(l_po_lot > 0) THEN -- po requisition per lot
2725: l_move.poReqLot := WIP_CONSTANTS.YES;
2726: ELSE
2727: l_move.poReqLot := WIP_CONSTANTS.NO;
2728: END IF;
2729:

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

2723:
2724: IF(l_po_lot > 0) THEN -- po requisition per lot
2725: l_move.poReqLot := WIP_CONSTANTS.YES;
2726: ELSE
2727: l_move.poReqLot := WIP_CONSTANTS.NO;
2728: END IF;
2729:
2730: -- return move profile back
2731: p_gib.move_profile := l_move;

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

2732:
2733: x_returnStatus := fnd_api.g_ret_sts_success;
2734:
2735: -- write to the log file
2736: IF (l_logLevel <= wip_constants.trace_logging) THEN
2737: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.get_move_profile',
2738: p_procReturnStatus => x_returnStatus,
2739: p_msg => 'procedure complete',
2740: x_returnStatus => l_returnStatus);

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

2744: WHEN others THEN
2745: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2746: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2747:
2748: IF (l_logLevel <= wip_constants.trace_logging) THEN
2749: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.get_move_profile',
2750: p_procReturnStatus => x_returnStatus,
2751: p_msg => l_errMsg,
2752: x_returnStatus => l_returnStatus);

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

2771: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2772:
2773: BEGIN
2774: -- write parameter value to log file
2775: IF (l_logLevel <= wip_constants.trace_logging) THEN
2776: l_params(1).paramName := 'p_group_id';
2777: l_params(1).paramValue := p_gib.group_id;
2778: l_params(2).paramName := 'p_txn_date';
2779: l_params(2).paramValue := p_gib.txn_date;

Line 2823: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2819: wip_move_txn_interface wmti
2820: WHERE wsmi.transaction_id = wmti.transaction_id
2821: AND wmti.group_id = p_gib.group_id
2822: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2823: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2824: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2825:
2826: -- IF debug message level = 2, write statement below to log file
2827: IF (l_logLevel <= wip_constants.full_logging) THEN

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

2820: WHERE wsmi.transaction_id = wmti.transaction_id
2821: AND wmti.group_id = p_gib.group_id
2822: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2823: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2824: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2825:
2826: -- IF debug message level = 2, write statement below to log file
2827: IF (l_logLevel <= wip_constants.full_logging) THEN
2828: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');

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

2823: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2824: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2825:
2826: -- IF debug message level = 2, write statement below to log file
2827: IF (l_logLevel <= wip_constants.full_logging) THEN
2828: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
2829: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
2830: fnd_message.set_token('ENTITY2', 'WIP_SERIAL_MOVE_TRANSACTIONS');
2831: l_msg := fnd_message.get;

Line 2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2958: FROM wip_move_txn_interface wmti,
2959: wip_discrete_jobs wdj
2960: WHERE wmti.group_id = p_gib.group_id
2961: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2964: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2965: WIP_CONSTANTS.LOTBASED)
2966: AND wdj.wip_entity_id = wmti.wip_entity_id

Line 2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2959: wip_discrete_jobs wdj
2960: WHERE wmti.group_id = p_gib.group_id
2961: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2964: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2965: WIP_CONSTANTS.LOTBASED)
2966: AND wdj.wip_entity_id = wmti.wip_entity_id
2967: AND wdj.organization_id = wmti.organization_id;

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

2960: WHERE wmti.group_id = p_gib.group_id
2961: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2964: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2965: WIP_CONSTANTS.LOTBASED)
2966: AND wdj.wip_entity_id = wmti.wip_entity_id
2967: AND wdj.organization_id = wmti.organization_id;
2968:

Line 2965: WIP_CONSTANTS.LOTBASED)

2961: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2964: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2965: WIP_CONSTANTS.LOTBASED)
2966: AND wdj.wip_entity_id = wmti.wip_entity_id
2967: AND wdj.organization_id = wmti.organization_id;
2968:
2969: -- IF debug message level = 2, write statement below to log file

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

2966: AND wdj.wip_entity_id = wmti.wip_entity_id
2967: AND wdj.organization_id = wmti.organization_id;
2968:
2969: -- IF debug message level = 2, write statement below to log file
2970: IF (l_logLevel <= wip_constants.full_logging) THEN
2971: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
2972: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
2973: fnd_message.set_token('ENTITY2', 'WIP_MOVE_TRANSACTIONS');
2974: l_msg := fnd_message.get;

Line 3095: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3091: wmti.overcompletion_transaction_id
3092: FROM wip_move_txn_interface wmti
3093: WHERE wmti.group_id = p_gib.group_id
3094: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3095: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3096: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3097: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;
3098:
3099: -- IF debug message level = 2, write statement below to log file

Line 3096: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3092: FROM wip_move_txn_interface wmti
3093: WHERE wmti.group_id = p_gib.group_id
3094: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3095: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3096: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3097: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;
3098:
3099: -- IF debug message level = 2, write statement below to log file
3100: IF (l_logLevel <= wip_constants.full_logging) THEN

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

3093: WHERE wmti.group_id = p_gib.group_id
3094: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3095: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3096: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3097: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;
3098:
3099: -- IF debug message level = 2, write statement below to log file
3100: IF (l_logLevel <= wip_constants.full_logging) THEN
3101: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');

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

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

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

3108:
3109: x_returnStatus := fnd_api.g_ret_sts_success;
3110:
3111: -- write to the log file
3112: IF (l_logLevel <= wip_constants.trace_logging) THEN
3113: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_history',
3114: p_procReturnStatus => x_returnStatus,
3115: p_msg => 'procedure complete',
3116: x_returnStatus => l_returnStatus);

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

3120: WHEN others THEN
3121: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3122: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
3123:
3124: IF (l_logLevel <= wip_constants.trace_logging) THEN
3125: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_history',
3126: p_procReturnStatus => x_returnStatus,
3127: p_msg => l_errMsg,
3128: x_returnStatus => l_returnStatus);

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

3148: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
3149:
3150: BEGIN
3151: -- write parameter value to log file
3152: IF (l_logLevel <= wip_constants.trace_logging) THEN
3153: l_params(1).paramName := 'p_group_id';
3154: l_params(1).paramValue := p_gib.group_id;
3155: l_params(2).paramName := 'p_txn_date';
3156: l_params(2).paramValue := p_gib.txn_date;

Line 3166: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3162: -- delete child records from WIP
3163: DELETE FROM wip_move_txn_interface wmti
3164: WHERE wmti.group_id = p_gib.group_id
3165: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3166: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3167: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3168: AND wmti.overcompletion_transaction_id IS NOT NULL
3169: AND wmti.overcompletion_primary_qty IS NULL
3170: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num

Line 3167: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3163: DELETE FROM wip_move_txn_interface wmti
3164: WHERE wmti.group_id = p_gib.group_id
3165: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3166: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3167: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3168: AND wmti.overcompletion_transaction_id IS NOT NULL
3169: AND wmti.overcompletion_primary_qty IS NULL
3170: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3171: AND wmti.fm_intraoperation_step_type =

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

3169: AND wmti.overcompletion_primary_qty IS NULL
3170: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3171: AND wmti.fm_intraoperation_step_type =
3172: wmti.to_intraoperation_step_type
3173: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE;
3174:
3175: x_returnStatus := fnd_api.g_ret_sts_success;
3176:
3177: -- write to the log file

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

3174:
3175: x_returnStatus := fnd_api.g_ret_sts_success;
3176:
3177: -- write to the log file
3178: IF (l_logLevel <= wip_constants.trace_logging) THEN
3179: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.delete_child_txn',
3180: p_procReturnStatus => x_returnStatus,
3181: p_msg => 'procedure complete',
3182: x_returnStatus => l_returnStatus);

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

3185: EXCEPTION
3186: WHEN others THEN
3187: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3188: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
3189: IF (l_logLevel <= wip_constants.trace_logging) THEN
3190: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.delete_child_txn',
3191: p_procReturnStatus => x_returnStatus,
3192: p_msg => l_errMsg,
3193: x_returnStatus => l_returnStatus);

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

3216: BEGIN
3217: l_move := p_gib.move_profile;
3218:
3219: -- write parameter value to log file
3220: IF (l_logLevel <= wip_constants.trace_logging) THEN
3221: l_params(1).paramName := 'p_group_id';
3222: l_params(1).paramValue := p_gib.group_id;
3223: l_params(2).paramName := 'p_txn_date';
3224: l_params(2).paramValue := p_gib.txn_date;

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

3257: x_returnStatus => l_returnStatus);
3258: END IF;
3259:
3260: -- Per item basis type for discrete jobs
3261: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3262: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3263: /* Fix for bug 4036149: Added leading hint to drive from the table
3264: wip_move_txn_interface to improve performance */
3265: INSERT INTO wip_cost_txn_interface

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

3258: END IF;
3259:
3260: -- Per item basis type for discrete jobs
3261: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3262: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3263: /* Fix for bug 4036149: Added leading hint to drive from the table
3264: wip_move_txn_interface to improve performance */
3265: INSERT INTO wip_cost_txn_interface
3266: (transaction_id,

Line 3338: WIP_CONSTANTS.RES_PROC, -- process_phase

3334: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
3335: p_gib.group_id,
3336: wmti.source_code,
3337: wmti.source_line_id,
3338: WIP_CONSTANTS.RES_PROC, -- process_phase
3339: WIP_CONSTANTS.PENDING, -- process_status
3340: WIP_CONSTANTS.RES_TXN, -- transaction_type
3341: wmti.organization_id,
3342: wmti.organization_code,

Line 3339: WIP_CONSTANTS.PENDING, -- process_status

3335: p_gib.group_id,
3336: wmti.source_code,
3337: wmti.source_line_id,
3338: WIP_CONSTANTS.RES_PROC, -- process_phase
3339: WIP_CONSTANTS.PENDING, -- process_status
3340: WIP_CONSTANTS.RES_TXN, -- transaction_type
3341: wmti.organization_id,
3342: wmti.organization_code,
3343: wmti.wip_entity_id,

Line 3340: WIP_CONSTANTS.RES_TXN, -- transaction_type

3336: wmti.source_code,
3337: wmti.source_line_id,
3338: WIP_CONSTANTS.RES_PROC, -- process_phase
3339: WIP_CONSTANTS.PENDING, -- process_status
3340: WIP_CONSTANTS.RES_TXN, -- transaction_type
3341: wmti.organization_id,
3342: wmti.organization_code,
3343: wmti.wip_entity_id,
3344: wmti.entity_type,

Line 3366: WIP_CONSTANTS.RUN),

3362: wor.usage_rate_or_amount * NVL(wmti.primary_quantity *
3363: DECODE(
3364: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3365: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3366: WIP_CONSTANTS.RUN),
3367: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3368: WIP_CONSTANTS.RUN),1,1,-1),
3369: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3370: WIP_CONSTANTS.RUN),1,1,-1),

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

3364: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3365: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3366: WIP_CONSTANTS.RUN),
3367: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3368: WIP_CONSTANTS.RUN),1,1,-1),
3369: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3370: WIP_CONSTANTS.RUN),1,1,-1),
3371: 1,-1),
3372: 1, 1,

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

3366: WIP_CONSTANTS.RUN),
3367: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3368: WIP_CONSTANTS.RUN),1,1,-1),
3369: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3370: WIP_CONSTANTS.RUN),1,1,-1),
3371: 1,-1),
3372: 1, 1,
3373: -1,-1),
3374: 0), -- transaction_quantity

Line 3380: WIP_CONSTANTS.RUN),

3376: wor.usage_rate_or_amount * NVL(wmti.primary_quantity *
3377: DECODE(
3378: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3379: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3380: WIP_CONSTANTS.RUN),
3381: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3382: WIP_CONSTANTS.RUN),1,1,-1),
3383: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3384: WIP_CONSTANTS.RUN),1,1,-1),

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

3378: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3379: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3380: WIP_CONSTANTS.RUN),
3381: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3382: WIP_CONSTANTS.RUN),1,1,-1),
3383: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3384: WIP_CONSTANTS.RUN),1,1,-1),
3385: 1,-1),
3386: 1, 1,

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

3380: WIP_CONSTANTS.RUN),
3381: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3382: WIP_CONSTANTS.RUN),1,1,-1),
3383: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3384: WIP_CONSTANTS.RUN),1,1,-1),
3385: 1,-1),
3386: 1, 1,
3387: -1,-1),
3388: 0), -- primary_quantity

Line 3411: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3407: wip_operations wop,
3408: wip_move_txn_interface wmti
3409: WHERE wmti.group_id = p_gib.group_id
3410: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3411: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3412: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3413: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3414: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3415: AND wop.organization_id = wmti.organization_id

Line 3412: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3408: wip_move_txn_interface wmti
3409: WHERE wmti.group_id = p_gib.group_id
3410: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3411: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3412: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3413: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3414: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3415: AND wop.organization_id = wmti.organization_id
3416: AND wop.wip_entity_id = wmti.wip_entity_id

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

3409: WHERE wmti.group_id = p_gib.group_id
3410: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3411: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3412: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3413: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3414: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3415: AND wop.organization_id = wmti.organization_id
3416: AND wop.wip_entity_id = wmti.wip_entity_id
3417: AND wop.organization_id = wor.organization_id

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

3410: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3411: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3412: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3413: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3414: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3415: AND wop.organization_id = wmti.organization_id
3416: AND wop.wip_entity_id = wmti.wip_entity_id
3417: AND wop.organization_id = wor.organization_id
3418: AND wop.wip_entity_id = wor.wip_entity_id

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

3417: AND wop.organization_id = wor.organization_id
3418: AND wop.wip_entity_id = wor.wip_entity_id
3419: AND wop.operation_seq_num = wor.operation_seq_num
3420: /* added for OSFM jump enhancement 2541431 */
3421: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3422: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3423: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3424: AND wop.organization_id = bd.organization_id
3425: AND NVL(wor.department_id, wop.department_id) = bd.department_id

Line 3422: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

3418: AND wop.wip_entity_id = wor.wip_entity_id
3419: AND wop.operation_seq_num = wor.operation_seq_num
3420: /* added for OSFM jump enhancement 2541431 */
3421: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3422: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3423: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3424: AND wop.organization_id = bd.organization_id
3425: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3426: AND wor.organization_id = br.organization_id

Line 3423: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

3419: AND wop.operation_seq_num = wor.operation_seq_num
3420: /* added for OSFM jump enhancement 2541431 */
3421: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3422: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3423: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3424: AND wop.organization_id = bd.organization_id
3425: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3426: AND wor.organization_id = br.organization_id
3427: AND wor.resource_id = br.resource_id

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

3431: AND wdj.organization_id = wmti.organization_id
3432: AND (
3433: (wop.operation_seq_num >= wmti.fm_operation_seq_num
3434: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3435: WIP_CONSTANTS.RUN), 1,1,0)
3436: AND wop.operation_seq_num < wmti.to_operation_seq_num
3437: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3438: WIP_CONSTANTS.RUN),1,1,0)
3439: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

3434: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3435: WIP_CONSTANTS.RUN), 1,1,0)
3436: AND wop.operation_seq_num < wmti.to_operation_seq_num
3437: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3438: WIP_CONSTANTS.RUN),1,1,0)
3439: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3440: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3441: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3442: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

3437: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3438: WIP_CONSTANTS.RUN),1,1,0)
3439: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3440: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3441: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3442: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3443: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3444: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3445: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

3438: WIP_CONSTANTS.RUN),1,1,0)
3439: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3440: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3441: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3442: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3443: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3444: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3445: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3446: AND wmti.to_intraoperation_step_type >

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

3439: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3440: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3441: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3442: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3443: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3444: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3445: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3446: AND wmti.to_intraoperation_step_type >
3447: WIP_CONSTANTS.RUN)))

Line 3447: WIP_CONSTANTS.RUN)))

3443: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3444: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3445: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3446: AND wmti.to_intraoperation_step_type >
3447: WIP_CONSTANTS.RUN)))
3448: OR
3449: (wop.operation_seq_num < wmti.fm_operation_seq_num
3450: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3451: WIP_CONSTANTS.RUN),1,1,0)

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

3447: WIP_CONSTANTS.RUN)))
3448: OR
3449: (wop.operation_seq_num < wmti.fm_operation_seq_num
3450: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3451: WIP_CONSTANTS.RUN),1,1,0)
3452: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3453: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3454: WIP_CONSTANTS.RUN),1,1,0)
3455: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

3450: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3451: WIP_CONSTANTS.RUN),1,1,0)
3452: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3453: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3454: WIP_CONSTANTS.RUN),1,1,0)
3455: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3456: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3457: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3458: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

3453: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3454: WIP_CONSTANTS.RUN),1,1,0)
3455: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3456: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3457: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3458: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3459: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3460: OR wop.operation_seq_num = wmti.to_operation_seq_num
3461: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

3454: WIP_CONSTANTS.RUN),1,1,0)
3455: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3456: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3457: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3458: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3459: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3460: OR wop.operation_seq_num = wmti.to_operation_seq_num
3461: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3462: AND wmti.fm_intraoperation_step_type >

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

3455: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3456: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3457: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3458: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3459: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3460: OR wop.operation_seq_num = wmti.to_operation_seq_num
3461: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3462: AND wmti.fm_intraoperation_step_type >
3463: WIP_CONSTANTS.RUN)))

Line 3463: WIP_CONSTANTS.RUN)))

3459: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3460: OR wop.operation_seq_num = wmti.to_operation_seq_num
3461: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3462: AND wmti.fm_intraoperation_step_type >
3463: WIP_CONSTANTS.RUN)))
3464: );
3465:
3466: -- IF debug message level = 2, write statement below to log file
3467: IF (l_logLevel <= wip_constants.full_logging) THEN

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

3463: WIP_CONSTANTS.RUN)))
3464: );
3465:
3466: -- IF debug message level = 2, write statement below to log file
3467: IF (l_logLevel <= wip_constants.full_logging) THEN
3468: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
3469: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
3470: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
3471: l_msg := fnd_message.get;

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

3475:
3476: END IF; -- Per item basis type for discrete jobs
3477:
3478: -- Per item basis type for repetitive schedule
3479: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
3480: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3481:
3482: INSERT INTO wip_cost_txn_interface
3483: (transaction_id,

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

3476: END IF; -- Per item basis type for discrete jobs
3477:
3478: -- Per item basis type for repetitive schedule
3479: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
3480: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3481:
3482: INSERT INTO wip_cost_txn_interface
3483: (transaction_id,
3484: last_update_date,

Line 3552: WIP_CONSTANTS.RES_PROC, -- process_phase

3548: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
3549: p_gib.group_id,
3550: MAX(wmti.source_code),
3551: MAX(wmti.source_line_id),
3552: WIP_CONSTANTS.RES_PROC, -- process_phase
3553: WIP_CONSTANTS.PENDING, -- process_status
3554: WIP_CONSTANTS.RES_TXN, -- transaction_type
3555: wmti.organization_id,
3556: MAX(wmti.organization_code),

Line 3553: WIP_CONSTANTS.PENDING, -- process_status

3549: p_gib.group_id,
3550: MAX(wmti.source_code),
3551: MAX(wmti.source_line_id),
3552: WIP_CONSTANTS.RES_PROC, -- process_phase
3553: WIP_CONSTANTS.PENDING, -- process_status
3554: WIP_CONSTANTS.RES_TXN, -- transaction_type
3555: wmti.organization_id,
3556: MAX(wmti.organization_code),
3557: wmti.wip_entity_id,

Line 3554: WIP_CONSTANTS.RES_TXN, -- transaction_type

3550: MAX(wmti.source_code),
3551: MAX(wmti.source_line_id),
3552: WIP_CONSTANTS.RES_PROC, -- process_phase
3553: WIP_CONSTANTS.PENDING, -- process_status
3554: WIP_CONSTANTS.RES_TXN, -- transaction_type
3555: wmti.organization_id,
3556: MAX(wmti.organization_code),
3557: wmti.wip_entity_id,
3558: MAX(wmti.entity_type),

Line 3580: WIP_CONSTANTS.RUN),

3576: SUM(wor.usage_rate_or_amount * NVL(wma.primary_quantity *
3577: DECODE(
3578: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3579: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3580: WIP_CONSTANTS.RUN),
3581: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3582: WIP_CONSTANTS.RUN),1,1,-1),
3583: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3584: WIP_CONSTANTS.RUN),1,1,-1),

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

3578: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3579: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3580: WIP_CONSTANTS.RUN),
3581: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3582: WIP_CONSTANTS.RUN),1,1,-1),
3583: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3584: WIP_CONSTANTS.RUN),1,1,-1),
3585: 1,-1),
3586: 1, 1,

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

3580: WIP_CONSTANTS.RUN),
3581: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3582: WIP_CONSTANTS.RUN),1,1,-1),
3583: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3584: WIP_CONSTANTS.RUN),1,1,-1),
3585: 1,-1),
3586: 1, 1,
3587: -1,-1)
3588: ,0)), -- transaction_quantity

Line 3594: WIP_CONSTANTS.RUN),

3590: SUM(wor.usage_rate_or_amount * NVL(wma.primary_quantity *
3591: DECODE(
3592: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3593: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3594: WIP_CONSTANTS.RUN),
3595: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3596: WIP_CONSTANTS.RUN),1,1,-1),
3597: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3598: WIP_CONSTANTS.RUN),1,1,-1),

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

3592: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3593: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3594: WIP_CONSTANTS.RUN),
3595: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3596: WIP_CONSTANTS.RUN),1,1,-1),
3597: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3598: WIP_CONSTANTS.RUN),1,1,-1),
3599: 1,-1),
3600: 1, 1,

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

3594: WIP_CONSTANTS.RUN),
3595: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3596: WIP_CONSTANTS.RUN),1,1,-1),
3597: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3598: WIP_CONSTANTS.RUN),1,1,-1),
3599: 1,-1),
3600: 1, 1,
3601: -1,-1)
3602: ,0)), -- primary_quantity

Line 3623: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3619: wip_operations wop,
3620: wip_move_txn_interface wmti
3621: WHERE wmti.group_id = p_gib.group_id
3622: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3623: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3624: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3625: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
3626: AND wop.organization_id = wmti.organization_id
3627: AND wop.wip_entity_id = wmti.wip_entity_id

Line 3624: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3620: wip_move_txn_interface wmti
3621: WHERE wmti.group_id = p_gib.group_id
3622: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3623: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3624: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3625: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
3626: AND wop.organization_id = wmti.organization_id
3627: AND wop.wip_entity_id = wmti.wip_entity_id
3628: AND wop.wip_entity_id = wor.wip_entity_id

Line 3625: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

3621: WHERE wmti.group_id = p_gib.group_id
3622: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3623: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3624: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3625: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
3626: AND wop.organization_id = wmti.organization_id
3627: AND wop.wip_entity_id = wmti.wip_entity_id
3628: AND wop.wip_entity_id = wor.wip_entity_id
3629: AND wop.operation_seq_num = wor.operation_seq_num

Line 3635: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

3631: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
3632: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
3633: AND wmti.organization_id = wma.organization_id
3634: AND wmti.transaction_id = wma.transaction_id
3635: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3636: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3637: AND wop.organization_id = bd.organization_id
3638: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3639: AND wor.organization_id = br.organization_id

Line 3636: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

3632: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
3633: AND wmti.organization_id = wma.organization_id
3634: AND wmti.transaction_id = wma.transaction_id
3635: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3636: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3637: AND wop.organization_id = bd.organization_id
3638: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3639: AND wor.organization_id = br.organization_id
3640: AND wor.resource_id = br.resource_id

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

3642: AND wor.activity_id = ca.activity_id (+)
3643: AND (
3644: (wop.operation_seq_num >= wmti.fm_operation_seq_num
3645: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3646: WIP_CONSTANTS.RUN),1,1,0)
3647: AND wop.operation_seq_num < wmti.to_operation_seq_num
3648: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3649: WIP_CONSTANTS.RUN),1,1,0)
3650: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

3645: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3646: WIP_CONSTANTS.RUN),1,1,0)
3647: AND wop.operation_seq_num < wmti.to_operation_seq_num
3648: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3649: WIP_CONSTANTS.RUN),1,1,0)
3650: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3651: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3652: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3653: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

3648: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3649: WIP_CONSTANTS.RUN),1,1,0)
3650: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3651: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3652: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3653: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3654: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3655: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3656: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

3649: WIP_CONSTANTS.RUN),1,1,0)
3650: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3651: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3652: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3653: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3654: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3655: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3656: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3657: AND wmti.to_intraoperation_step_type >

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

3650: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3651: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3652: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3653: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3654: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3655: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3656: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3657: AND wmti.to_intraoperation_step_type >
3658: WIP_CONSTANTS.RUN)))

Line 3658: WIP_CONSTANTS.RUN)))

3654: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3655: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3656: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3657: AND wmti.to_intraoperation_step_type >
3658: WIP_CONSTANTS.RUN)))
3659: OR
3660: (wop.operation_seq_num < wmti.fm_operation_seq_num
3661: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3662: WIP_CONSTANTS.RUN),1,1,0)

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

3658: WIP_CONSTANTS.RUN)))
3659: OR
3660: (wop.operation_seq_num < wmti.fm_operation_seq_num
3661: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3662: WIP_CONSTANTS.RUN),1,1,0)
3663: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3664: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3665: WIP_CONSTANTS.RUN),1,1,0)
3666: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

3661: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3662: WIP_CONSTANTS.RUN),1,1,0)
3663: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3664: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3665: WIP_CONSTANTS.RUN),1,1,0)
3666: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3667: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3668: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3669: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

3664: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3665: WIP_CONSTANTS.RUN),1,1,0)
3666: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3667: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3668: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3669: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3670: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3671: OR wop.operation_seq_num = wmti.to_operation_seq_num
3672: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

3665: WIP_CONSTANTS.RUN),1,1,0)
3666: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3667: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3668: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3669: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3670: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3671: OR wop.operation_seq_num = wmti.to_operation_seq_num
3672: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3673: AND wmti.fm_intraoperation_step_type >

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

3666: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3667: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3668: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3669: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3670: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3671: OR wop.operation_seq_num = wmti.to_operation_seq_num
3672: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3673: AND wmti.fm_intraoperation_step_type >
3674: WIP_CONSTANTS.RUN))))

Line 3674: WIP_CONSTANTS.RUN))))

3670: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3671: OR wop.operation_seq_num = wmti.to_operation_seq_num
3672: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3673: AND wmti.fm_intraoperation_step_type >
3674: WIP_CONSTANTS.RUN))))
3675: GROUP BY wmti.organization_id,
3676: wmti.wip_entity_id,
3677: wmti.line_id,
3678: wop.operation_seq_num,

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

3683: wor.usage_rate_or_amount,
3684: wmti.transaction_id;
3685:
3686: -- IF debug message level = 2, write statement below to log file
3687: IF (l_logLevel <= wip_constants.full_logging) THEN
3688: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
3689: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
3690: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
3691: l_msg := fnd_message.get;

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

3700: department_id cannot be changed so we can take the MAX,
3701: also columns such as usage_rate_or_amount are not part of
3702: the transaction they are looked up in wip_operation_resources
3703: +------------------------------------------------------------*/
3704: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3705: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
3706:
3707: INSERT INTO wip_cost_txn_interface
3708: (transaction_id,

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

3701: also columns such as usage_rate_or_amount are not part of
3702: the transaction they are looked up in wip_operation_resources
3703: +------------------------------------------------------------*/
3704: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3705: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
3706:
3707: INSERT INTO wip_cost_txn_interface
3708: (transaction_id,
3709: last_update_date,

Line 3780: WIP_CONSTANTS.RES_PROC, -- process_phase

3776: p_gib.group_id,
3777: MAX(wmti.source_code), -- source_code
3778: -- Fixed bug 2465148
3779: MAX(wmti.source_line_id), -- source_line_id
3780: WIP_CONSTANTS.RES_PROC, -- process_phase
3781: WIP_CONSTANTS.PENDING, -- process_status
3782: WIP_CONSTANTS.RES_TXN, -- transaction_type
3783: wop.organization_id,
3784: MAX(wmti.organization_code),

Line 3781: WIP_CONSTANTS.PENDING, -- process_status

3777: MAX(wmti.source_code), -- source_code
3778: -- Fixed bug 2465148
3779: MAX(wmti.source_line_id), -- source_line_id
3780: WIP_CONSTANTS.RES_PROC, -- process_phase
3781: WIP_CONSTANTS.PENDING, -- process_status
3782: WIP_CONSTANTS.RES_TXN, -- transaction_type
3783: wop.organization_id,
3784: MAX(wmti.organization_code),
3785: wop.wip_entity_id,

Line 3782: WIP_CONSTANTS.RES_TXN, -- transaction_type

3778: -- Fixed bug 2465148
3779: MAX(wmti.source_line_id), -- source_line_id
3780: WIP_CONSTANTS.RES_PROC, -- process_phase
3781: WIP_CONSTANTS.PENDING, -- process_status
3782: WIP_CONSTANTS.RES_TXN, -- transaction_type
3783: wop.organization_id,
3784: MAX(wmti.organization_code),
3785: wop.wip_entity_id,
3786: MAX(entity_type),

Line 3810: WIP_CONSTANTS.RUN),

3806: NVL(SUM(wmti.primary_quantity *
3807: DECODE(SIGN(wmti.to_operation_seq_num -
3808: wmti.fm_operation_seq_num),
3809: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3810: WIP_CONSTANTS.RUN),
3811: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3812: WIP_CONSTANTS.RUN),1,1,-1),
3813: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3814: WIP_CONSTANTS.RUN),1,1,-1),

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

3808: wmti.fm_operation_seq_num),
3809: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3810: WIP_CONSTANTS.RUN),
3811: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3812: WIP_CONSTANTS.RUN),1,1,-1),
3813: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3814: WIP_CONSTANTS.RUN),1,1,-1),
3815: 1,-1),
3816: 1, 1,

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

3810: WIP_CONSTANTS.RUN),
3811: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3812: WIP_CONSTANTS.RUN),1,1,-1),
3813: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3814: WIP_CONSTANTS.RUN),1,1,-1),
3815: 1,-1),
3816: 1, 1,
3817: -1,-1)
3818: ),0)), -- NVL

Line 3829: WIP_CONSTANTS.RUN),

3825: NVL(SUM(wmti.primary_quantity *
3826: DECODE(SIGN(wmti.to_operation_seq_num -
3827: wmti.fm_operation_seq_num),
3828: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3829: WIP_CONSTANTS.RUN),
3830: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3831: WIP_CONSTANTS.RUN),1,1,-1),
3832: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3833: WIP_CONSTANTS.RUN),1,1,-1),

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

3827: wmti.fm_operation_seq_num),
3828: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3829: WIP_CONSTANTS.RUN),
3830: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3831: WIP_CONSTANTS.RUN),1,1,-1),
3832: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3833: WIP_CONSTANTS.RUN),1,1,-1),
3834: 1,-1),
3835: 1, 1,

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

3829: WIP_CONSTANTS.RUN),
3830: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3831: WIP_CONSTANTS.RUN),1,1,-1),
3832: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3833: WIP_CONSTANTS.RUN),1,1,-1),
3834: 1,-1),
3835: 1, 1,
3836: -1,-1)
3837: ),0)), -- NVL

Line 3864: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3860: wip_operations wop,
3861: wip_move_txn_interface wmti
3862: WHERE wmti.group_id = p_gib.group_id
3863: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3864: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3865: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3866: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3867: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3868: AND wop.organization_id = wmti.organization_id

Line 3865: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3861: wip_move_txn_interface wmti
3862: WHERE wmti.group_id = p_gib.group_id
3863: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3864: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3865: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3866: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3867: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3868: AND wop.organization_id = wmti.organization_id
3869: AND wop.wip_entity_id = wmti.wip_entity_id

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

3862: WHERE wmti.group_id = p_gib.group_id
3863: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3864: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3865: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3866: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3867: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3868: AND wop.organization_id = wmti.organization_id
3869: AND wop.wip_entity_id = wmti.wip_entity_id
3870: AND wop.wip_entity_id = wor.wip_entity_id

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

3863: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3864: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3865: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3866: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3867: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3868: AND wop.organization_id = wmti.organization_id
3869: AND wop.wip_entity_id = wmti.wip_entity_id
3870: AND wop.wip_entity_id = wor.wip_entity_id
3871: AND wop.operation_seq_num = wor.operation_seq_num

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

3869: AND wop.wip_entity_id = wmti.wip_entity_id
3870: AND wop.wip_entity_id = wor.wip_entity_id
3871: AND wop.operation_seq_num = wor.operation_seq_num
3872: /* added for OSFM jump enhancement 2541431 */
3873: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3874: AND wop.organization_id = wor.organization_id
3875: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3876: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
3877: AND wop.organization_id = bd.organization_id

Line 3875: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

3871: AND wop.operation_seq_num = wor.operation_seq_num
3872: /* added for OSFM jump enhancement 2541431 */
3873: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3874: AND wop.organization_id = wor.organization_id
3875: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3876: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
3877: AND wop.organization_id = bd.organization_id
3878: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3879: AND wor.organization_id = br.organization_id

Line 3876: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

3872: /* added for OSFM jump enhancement 2541431 */
3873: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3874: AND wop.organization_id = wor.organization_id
3875: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3876: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
3877: AND wop.organization_id = bd.organization_id
3878: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3879: AND wor.organization_id = br.organization_id
3880: AND wor.resource_id = br.resource_id

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

3884: AND wdj.organization_id = wmti.organization_id
3885: AND (
3886: (wop.operation_seq_num >= wmti.fm_operation_seq_num
3887: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3888: WIP_CONSTANTS.RUN),1,1,0)
3889: AND wop.operation_seq_num < wmti.to_operation_seq_num
3890: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3891: WIP_CONSTANTS.RUN),1,1,0)
3892: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

3887: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3888: WIP_CONSTANTS.RUN),1,1,0)
3889: AND wop.operation_seq_num < wmti.to_operation_seq_num
3890: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3891: WIP_CONSTANTS.RUN),1,1,0)
3892: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3893: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3894: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3895: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

3890: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3891: WIP_CONSTANTS.RUN),1,1,0)
3892: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3893: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3894: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3895: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3896: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3897: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3898: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

3891: WIP_CONSTANTS.RUN),1,1,0)
3892: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3893: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3894: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3895: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3896: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3897: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3898: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3899: AND wmti.to_intraoperation_step_type >

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

3892: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3893: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3894: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3895: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3896: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3897: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3898: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3899: AND wmti.to_intraoperation_step_type >
3900: WIP_CONSTANTS.RUN)))

Line 3900: WIP_CONSTANTS.RUN)))

3896: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3897: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3898: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3899: AND wmti.to_intraoperation_step_type >
3900: WIP_CONSTANTS.RUN)))
3901: OR
3902: (wop.operation_seq_num < wmti.fm_operation_seq_num
3903: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3904: WIP_CONSTANTS.RUN),1,1,0)

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

3900: WIP_CONSTANTS.RUN)))
3901: OR
3902: (wop.operation_seq_num < wmti.fm_operation_seq_num
3903: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3904: WIP_CONSTANTS.RUN),1,1,0)
3905: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3906: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3907: WIP_CONSTANTS.RUN),1,1,0)
3908: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

3903: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3904: WIP_CONSTANTS.RUN),1,1,0)
3905: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3906: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3907: WIP_CONSTANTS.RUN),1,1,0)
3908: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3909: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3910: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3911: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

3906: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3907: WIP_CONSTANTS.RUN),1,1,0)
3908: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3909: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3910: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3911: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3912: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3913: OR wop.operation_seq_num = wmti.to_operation_seq_num
3914: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

3907: WIP_CONSTANTS.RUN),1,1,0)
3908: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3909: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3910: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3911: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3912: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3913: OR wop.operation_seq_num = wmti.to_operation_seq_num
3914: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3915: AND wmti.fm_intraoperation_step_type >

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

3908: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3909: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3910: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3911: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3912: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3913: OR wop.operation_seq_num = wmti.to_operation_seq_num
3914: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3915: AND wmti.fm_intraoperation_step_type >
3916: WIP_CONSTANTS.RUN))))

Line 3916: WIP_CONSTANTS.RUN))))

3912: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3913: OR wop.operation_seq_num = wmti.to_operation_seq_num
3914: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3915: AND wmti.fm_intraoperation_step_type >
3916: WIP_CONSTANTS.RUN))))
3917: GROUP BY wop.organization_id,
3918: wop.wip_entity_id,
3919: wop.operation_seq_num,
3920: wor.resource_seq_num

Line 3927: WIP_CONSTANTS.RUN),

3923: NVL(SUM(wmti.primary_quantity *
3924: DECODE(SIGN(wmti.to_operation_seq_num -
3925: wmti.fm_operation_seq_num),
3926: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3927: WIP_CONSTANTS.RUN),
3928: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3929: WIP_CONSTANTS.RUN),1,1,-1),
3930: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3931: WIP_CONSTANTS.RUN),1,1,-1),

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

3925: wmti.fm_operation_seq_num),
3926: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3927: WIP_CONSTANTS.RUN),
3928: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3929: WIP_CONSTANTS.RUN),1,1,-1),
3930: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3931: WIP_CONSTANTS.RUN),1,1,-1),
3932: 1,-1),
3933: 1, 1,

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

3927: WIP_CONSTANTS.RUN),
3928: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3929: WIP_CONSTANTS.RUN),1,1,-1),
3930: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3931: WIP_CONSTANTS.RUN),1,1,-1),
3932: 1,-1),
3933: 1, 1,
3934: -1,-1)
3935: ),0)), -- NVL

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

3937: 1, DECODE(SIGN(MAX(wop.quantity_completed)),1,0,1),
3938: -1, DECODE(SIGN(MAX(wop.quantity_completed)),1,-1,0));
3939:
3940: -- IF debug message level = 2, write statement below to log file
3941: IF (l_logLevel <= wip_constants.full_logging) THEN
3942: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
3943: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
3944: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
3945: l_msg := fnd_message.get;

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

3949:
3950: END IF; -- Per order basis type for discrete jobs
3951:
3952: -- Per order basis type for repetitive
3953: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
3954: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
3955:
3956: INSERT INTO wip_cost_txn_interface
3957: (transaction_id,

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

3950: END IF; -- Per order basis type for discrete jobs
3951:
3952: -- Per order basis type for repetitive
3953: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
3954: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
3955:
3956: INSERT INTO wip_cost_txn_interface
3957: (transaction_id,
3958: last_update_date,

Line 4027: WIP_CONSTANTS.RES_PROC, -- process_phase

4023: p_gib.group_id,
4024: MAX(wmti.source_code), -- source_code
4025: -- Fixed bug 2465148
4026: MAX(wmti.source_line_id), -- source_line_id
4027: WIP_CONSTANTS.RES_PROC, -- process_phase
4028: WIP_CONSTANTS.PENDING, -- process_status
4029: WIP_CONSTANTS.RES_TXN, -- transaction_type
4030: wop.organization_id,
4031: MAX(wmti.organization_code),

Line 4028: WIP_CONSTANTS.PENDING, -- process_status

4024: MAX(wmti.source_code), -- source_code
4025: -- Fixed bug 2465148
4026: MAX(wmti.source_line_id), -- source_line_id
4027: WIP_CONSTANTS.RES_PROC, -- process_phase
4028: WIP_CONSTANTS.PENDING, -- process_status
4029: WIP_CONSTANTS.RES_TXN, -- transaction_type
4030: wop.organization_id,
4031: MAX(wmti.organization_code),
4032: wop.wip_entity_id,

Line 4029: WIP_CONSTANTS.RES_TXN, -- transaction_type

4025: -- Fixed bug 2465148
4026: MAX(wmti.source_line_id), -- source_line_id
4027: WIP_CONSTANTS.RES_PROC, -- process_phase
4028: WIP_CONSTANTS.PENDING, -- process_status
4029: WIP_CONSTANTS.RES_TXN, -- transaction_type
4030: wop.organization_id,
4031: MAX(wmti.organization_code),
4032: wop.wip_entity_id,
4033: MAX(entity_type),

Line 4075: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

4071: wip_operations wop,
4072: wip_move_txn_interface wmti
4073: WHERE wmti.group_id = p_gib.group_id
4074: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4075: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4076: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4077: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4078: AND wop.organization_id = wmti.organization_id
4079: AND wop.wip_entity_id = wmti.wip_entity_id

Line 4076: AND wmti.process_status = WIP_CONSTANTS.RUNNING

4072: wip_move_txn_interface wmti
4073: WHERE wmti.group_id = p_gib.group_id
4074: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4075: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4076: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4077: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4078: AND wop.organization_id = wmti.organization_id
4079: AND wop.wip_entity_id = wmti.wip_entity_id
4080: AND wop.wip_entity_id = wor.wip_entity_id

Line 4077: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

4073: WHERE wmti.group_id = p_gib.group_id
4074: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4075: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4076: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4077: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4078: AND wop.organization_id = wmti.organization_id
4079: AND wop.wip_entity_id = wmti.wip_entity_id
4080: AND wop.wip_entity_id = wor.wip_entity_id
4081: AND wop.operation_seq_num = wor.operation_seq_num

Line 4087: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

4083: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
4084: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
4085: AND wmti.organization_id = wma.organization_id
4086: AND wmti.transaction_id = wma.transaction_id
4087: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4088: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4089: AND wop.organization_id = bd.organization_id
4090: AND NVL(wor.department_id, wop.department_id) = bd.department_id
4091: AND wor.organization_id = br.organization_id

Line 4088: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

4084: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
4085: AND wmti.organization_id = wma.organization_id
4086: AND wmti.transaction_id = wma.transaction_id
4087: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4088: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4089: AND wop.organization_id = bd.organization_id
4090: AND NVL(wor.department_id, wop.department_id) = bd.department_id
4091: AND wor.organization_id = br.organization_id
4092: AND wor.resource_id = br.resource_id

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

4094: AND wor.activity_id = ca.activity_id (+)
4095: AND (
4096: (wop.operation_seq_num >= wmti.fm_operation_seq_num
4097: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4098: WIP_CONSTANTS.RUN),1,1,0)
4099: AND wop.operation_seq_num < wmti.to_operation_seq_num
4100: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4101: WIP_CONSTANTS.RUN),1,1,0)
4102: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

4097: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4098: WIP_CONSTANTS.RUN),1,1,0)
4099: AND wop.operation_seq_num < wmti.to_operation_seq_num
4100: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4101: WIP_CONSTANTS.RUN),1,1,0)
4102: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4103: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4104: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4105: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

4100: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4101: WIP_CONSTANTS.RUN),1,1,0)
4102: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4103: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4104: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4105: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4106: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4107: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4108: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

4101: WIP_CONSTANTS.RUN),1,1,0)
4102: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4103: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4104: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4105: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4106: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4107: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4108: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4109: AND wmti.to_intraoperation_step_type >

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

4102: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4103: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4104: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4105: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4106: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4107: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4108: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4109: AND wmti.to_intraoperation_step_type >
4110: WIP_CONSTANTS.RUN)))

Line 4110: WIP_CONSTANTS.RUN)))

4106: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4107: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4108: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4109: AND wmti.to_intraoperation_step_type >
4110: WIP_CONSTANTS.RUN)))
4111: OR
4112: (wop.operation_seq_num < wmti.fm_operation_seq_num
4113: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4114: WIP_CONSTANTS.RUN),1,1,0)

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

4110: WIP_CONSTANTS.RUN)))
4111: OR
4112: (wop.operation_seq_num < wmti.fm_operation_seq_num
4113: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4114: WIP_CONSTANTS.RUN),1,1,0)
4115: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4116: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4117: WIP_CONSTANTS.RUN),1,1,0)
4118: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

4113: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4114: WIP_CONSTANTS.RUN),1,1,0)
4115: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4116: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4117: WIP_CONSTANTS.RUN),1,1,0)
4118: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4119: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4120: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4121: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

4116: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4117: WIP_CONSTANTS.RUN),1,1,0)
4118: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4119: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4120: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4121: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4122: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4123: OR wop.operation_seq_num = wmti.to_operation_seq_num
4124: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

4117: WIP_CONSTANTS.RUN),1,1,0)
4118: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4119: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4120: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4121: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4122: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4123: OR wop.operation_seq_num = wmti.to_operation_seq_num
4124: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4125: AND wmti.fm_intraoperation_step_type >

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

4118: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4119: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4120: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4121: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4122: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4123: OR wop.operation_seq_num = wmti.to_operation_seq_num
4124: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4125: AND wmti.fm_intraoperation_step_type >
4126: WIP_CONSTANTS.RUN))))

Line 4126: WIP_CONSTANTS.RUN))))

4122: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4123: OR wop.operation_seq_num = wmti.to_operation_seq_num
4124: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4125: AND wmti.fm_intraoperation_step_type >
4126: WIP_CONSTANTS.RUN))))
4127: GROUP BY wop.organization_id,
4128: wop.wip_entity_id,
4129: wmti.line_id,
4130: wma.repetitive_schedule_id,

Line 4143: WIP_CONSTANTS.RUN),

4139: wma.primary_quantity *
4140: DECODE(SIGN(wmti.to_operation_seq_num -
4141: wmti.fm_operation_seq_num),
4142: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4143: WIP_CONSTANTS.RUN),
4144: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4145: WIP_CONSTANTS.RUN),1,1,-1),
4146: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4147: WIP_CONSTANTS.RUN),1,1,-1),

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

4141: wmti.fm_operation_seq_num),
4142: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4143: WIP_CONSTANTS.RUN),
4144: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4145: WIP_CONSTANTS.RUN),1,1,-1),
4146: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4147: WIP_CONSTANTS.RUN),1,1,-1),
4148: 1,-1),
4149: 1, 1,

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

4143: WIP_CONSTANTS.RUN),
4144: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4145: WIP_CONSTANTS.RUN),1,1,-1),
4146: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4147: WIP_CONSTANTS.RUN),1,1,-1),
4148: 1,-1),
4149: 1, 1,
4150: -1,-1)
4151: ),0)), -- NVL

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

4153: 1, DECODE(SIGN(MAX(wop.quantity_completed)),1,0,1),
4154: -1, DECODE(SIGN(MAX(wop.quantity_completed)),1,-1,0));
4155:
4156: -- IF debug message level = 2, write statement below to log file
4157: IF (l_logLevel <= wip_constants.full_logging) THEN
4158: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4159: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4160: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4161: l_msg := fnd_message.get;

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

4165:
4166: END IF; -- Per order basis type for repetitive
4167:
4168: -- IF resource per item or resource per lot, set transaction_id
4169: IF(l_move.rsrcItem = WIP_CONSTANTS.YES OR
4170: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4171:
4172: /*------------------------------------------------------------+
4173: | Generate transaction_id for WIP_TXN_ALLOCATIONS |

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

4166: END IF; -- Per order basis type for repetitive
4167:
4168: -- IF resource per item or resource per lot, set transaction_id
4169: IF(l_move.rsrcItem = WIP_CONSTANTS.YES OR
4170: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4171:
4172: /*------------------------------------------------------------+
4173: | Generate transaction_id for WIP_TXN_ALLOCATIONS |
4174: +------------------------------------------------------------*/

Line 4179: AND transaction_type = WIP_CONSTANTS.RES_TXN;

4175: UPDATE wip_cost_txn_interface
4176: SET transaction_id = wip_transactions_s.nextval
4177: WHERE group_id = p_gib.group_id
4178: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
4179: AND transaction_type = WIP_CONSTANTS.RES_TXN;
4180:
4181: -- IF debug message level = 2, write statement below to log file
4182: IF (l_logLevel <= wip_constants.full_logging) THEN
4183: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

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

4178: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
4179: AND transaction_type = WIP_CONSTANTS.RES_TXN;
4180:
4181: -- IF debug message level = 2, write statement below to log file
4182: IF (l_logLevel <= wip_constants.full_logging) THEN
4183: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
4184: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4185: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4186: l_msg := fnd_message.get;

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

4190:
4191: END IF; -- Either resource per item or resource per lot
4192:
4193: -- Per order basis type for repetitive
4194: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
4195: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4196:
4197: /*------------------------------------------------------------+
4198: | Insert into cost allocations for repetitive schedules |

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

4191: END IF; -- Either resource per item or resource per lot
4192:
4193: -- Per order basis type for repetitive
4194: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
4195: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4196:
4197: /*------------------------------------------------------------+
4198: | Insert into cost allocations for repetitive schedules |
4199: | per lot

Line 4248: WIP_CONSTANTS.RUN),

4244: NVL(SUM(wma.primary_quantity *
4245: DECODE(SIGN(wmti.to_operation_seq_num -
4246: wmti.fm_operation_seq_num),
4247: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4248: WIP_CONSTANTS.RUN),
4249: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4250: WIP_CONSTANTS.RUN),1,1,-1),
4251: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4252: WIP_CONSTANTS.RUN),1,1,-1),

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

4246: wmti.fm_operation_seq_num),
4247: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4248: WIP_CONSTANTS.RUN),
4249: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4250: WIP_CONSTANTS.RUN),1,1,-1),
4251: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4252: WIP_CONSTANTS.RUN),1,1,-1),
4253: 1,-1),
4254: 1, 1,

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

4248: WIP_CONSTANTS.RUN),
4249: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4250: WIP_CONSTANTS.RUN),1,1,-1),
4251: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4252: WIP_CONSTANTS.RUN),1,1,-1),
4253: 1,-1),
4254: 1, 1,
4255: -1,-1)
4256: ),0)), -- NVL

Line 4266: WIP_CONSTANTS.RUN),

4262: NVL(SUM(wma.primary_quantity *
4263: DECODE(SIGN(wmti.to_operation_seq_num -
4264: wmti.fm_operation_seq_num),
4265: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4266: WIP_CONSTANTS.RUN),
4267: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4268: WIP_CONSTANTS.RUN),1,1,-1),
4269: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4270: WIP_CONSTANTS.RUN),1,1,-1),

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

4264: wmti.fm_operation_seq_num),
4265: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4266: WIP_CONSTANTS.RUN),
4267: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4268: WIP_CONSTANTS.RUN),1,1,-1),
4269: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4270: WIP_CONSTANTS.RUN),1,1,-1),
4271: 1,-1),
4272: 1, 1,

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

4266: WIP_CONSTANTS.RUN),
4267: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4268: WIP_CONSTANTS.RUN),1,1,-1),
4269: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4270: WIP_CONSTANTS.RUN),1,1,-1),
4271: 1,-1),
4272: 1, 1,
4273: -1,-1)
4274: ),0)), -- NVL

Line 4286: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

4282: wip_cost_txn_interface wci,
4283: wip_move_txn_interface wmti
4284: WHERE wmti.group_id = p_gib.group_id
4285: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4286: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4287: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4288: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4289: AND wmti.group_id = wci.group_id
4290: AND wci.organization_id = wmti.organization_id

Line 4287: AND wmti.process_status = WIP_CONSTANTS.RUNNING

4283: wip_move_txn_interface wmti
4284: WHERE wmti.group_id = p_gib.group_id
4285: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4286: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4287: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4288: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4289: AND wmti.group_id = wci.group_id
4290: AND wci.organization_id = wmti.organization_id
4291: AND wci.wip_entity_id = wmti.wip_entity_id

Line 4288: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

4284: WHERE wmti.group_id = p_gib.group_id
4285: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4286: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4287: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4288: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4289: AND wmti.group_id = wci.group_id
4290: AND wci.organization_id = wmti.organization_id
4291: AND wci.wip_entity_id = wmti.wip_entity_id
4292: AND wci.operation_seq_num = wop.operation_seq_num

Line 4293: AND wci.basis_type = WIP_CONSTANTS.PER_LOT

4289: AND wmti.group_id = wci.group_id
4290: AND wci.organization_id = wmti.organization_id
4291: AND wci.wip_entity_id = wmti.wip_entity_id
4292: AND wci.operation_seq_num = wop.operation_seq_num
4293: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
4294: AND wci.transaction_type = WIP_CONSTANTS.RES_TXN
4295: AND wop.repetitive_schedule_id = wor.repetitive_schedule_id
4296: AND wci.organization_id = wor.organization_id
4297: AND wci.wip_entity_id = wor.wip_entity_id

Line 4294: AND wci.transaction_type = WIP_CONSTANTS.RES_TXN

4290: AND wci.organization_id = wmti.organization_id
4291: AND wci.wip_entity_id = wmti.wip_entity_id
4292: AND wci.operation_seq_num = wop.operation_seq_num
4293: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
4294: AND wci.transaction_type = WIP_CONSTANTS.RES_TXN
4295: AND wop.repetitive_schedule_id = wor.repetitive_schedule_id
4296: AND wci.organization_id = wor.organization_id
4297: AND wci.wip_entity_id = wor.wip_entity_id
4298: AND wci.operation_seq_num = wor.operation_seq_num

Line 4304: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

4300: AND wci.resource_id = wor.resource_id
4301: AND wci.standard_rate_flag = wor.standard_rate_flag
4302: AND wci.usage_rate_or_amount = wor.usage_rate_or_amount
4303: AND NVL(wci.activity_id, -1) = NVL(wor.activity_id, -1)
4304: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4305: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4306: AND wop.organization_id = wmti.organization_id
4307: AND wop.wip_entity_id = wmti.wip_entity_id
4308: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id

Line 4305: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

4301: AND wci.standard_rate_flag = wor.standard_rate_flag
4302: AND wci.usage_rate_or_amount = wor.usage_rate_or_amount
4303: AND NVL(wci.activity_id, -1) = NVL(wor.activity_id, -1)
4304: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4305: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4306: AND wop.organization_id = wmti.organization_id
4307: AND wop.wip_entity_id = wmti.wip_entity_id
4308: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
4309: AND wmti.organization_id = wma.organization_id

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

4312: GROUP BY wci.transaction_id,
4313: wma.repetitive_schedule_id;
4314:
4315: -- IF debug message level = 2, write statement below to log file
4316: IF (l_logLevel <= wip_constants.full_logging) THEN
4317: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4318: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4319: fnd_message.set_token('ENTITY2', 'WIP_TXN_ALLOCATIONS');
4320: l_msg := fnd_message.get;

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

4326:
4327: x_returnStatus := fnd_api.g_ret_sts_success;
4328:
4329: -- write to the log file
4330: IF (l_logLevel <= wip_constants.trace_logging) THEN
4331: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_auto_resource',
4332: p_procReturnStatus => x_returnStatus,
4333: p_msg => 'procedure complete',
4334: x_returnStatus => l_returnStatus);

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

4338: WHEN others THEN
4339: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4340: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
4341:
4342: IF (l_logLevel <= wip_constants.trace_logging) THEN
4343: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_auto_resource',
4344: p_procReturnStatus => x_returnStatus,
4345: p_msg => l_errMsg,
4346: x_returnStatus => l_returnStatus);

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

4368: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
4369:
4370: BEGIN
4371: -- write parameter value to log file
4372: IF (l_logLevel <= wip_constants.trace_logging) THEN
4373: l_params(1).paramName := 'p_group_id';
4374: l_params(1).paramValue := p_gib.group_id;
4375: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.insert_txn_alloc',
4376: p_params => l_params,

Line 4418: WIP_CONSTANTS.RUN),

4414: wmta.transaction_quantity * wor.usage_rate_or_amount
4415: * DECODE(SIGN(wmti.to_operation_seq_num -
4416: wmti.fm_operation_seq_num),
4417: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4418: WIP_CONSTANTS.RUN),
4419: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4420: WIP_CONSTANTS.RUN),1, 1, -1)),
4421: 1, 1,
4422: -1,-1), -- transaction_quantity

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

4416: wmti.fm_operation_seq_num),
4417: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4418: WIP_CONSTANTS.RUN),
4419: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4420: WIP_CONSTANTS.RUN),1, 1, -1)),
4421: 1, 1,
4422: -1,-1), -- transaction_quantity
4423: wmta.primary_quantity * wor.usage_rate_or_amount
4424: * DECODE(SIGN(wmti.to_operation_seq_num -

Line 4427: WIP_CONSTANTS.RUN),

4423: wmta.primary_quantity * wor.usage_rate_or_amount
4424: * DECODE(SIGN(wmti.to_operation_seq_num -
4425: wmti.fm_operation_seq_num),
4426: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4427: WIP_CONSTANTS.RUN),
4428: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4429: WIP_CONSTANTS.RUN),1, 1, -1)),
4430: 1, 1,
4431: -1,-1) -- primary_quantity

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

4425: wmti.fm_operation_seq_num),
4426: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4427: WIP_CONSTANTS.RUN),
4428: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4429: WIP_CONSTANTS.RUN),1, 1, -1)),
4430: 1, 1,
4431: -1,-1) -- primary_quantity
4432: FROM wip_operation_resources wor,
4433: wip_move_txn_allocations wmta,

Line 4437: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC

4433: wip_move_txn_allocations wmta,
4434: wip_move_txn_interface wmti,
4435: wip_cost_txn_interface wcti
4436: WHERE wcti.group_id = p_gib.group_id
4437: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4438: AND wcti.process_status = WIP_CONSTANTS.PENDING
4439: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4440: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4441: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 4438: AND wcti.process_status = WIP_CONSTANTS.PENDING

4434: wip_move_txn_interface wmti,
4435: wip_cost_txn_interface wcti
4436: WHERE wcti.group_id = p_gib.group_id
4437: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4438: AND wcti.process_status = WIP_CONSTANTS.PENDING
4439: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4440: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4441: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4442: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM

Line 4439: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN

4435: wip_cost_txn_interface wcti
4436: WHERE wcti.group_id = p_gib.group_id
4437: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4438: AND wcti.process_status = WIP_CONSTANTS.PENDING
4439: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4440: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4441: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4442: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM
4443: AND wcti.group_id = wmti.group_id /* Bug 938039, 979553*/

Line 4441: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE

4437: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4438: AND wcti.process_status = WIP_CONSTANTS.PENDING
4439: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4440: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4441: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4442: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM
4443: AND wcti.group_id = wmti.group_id /* Bug 938039, 979553*/
4444: AND wcti.move_transaction_id = wmti.transaction_id
4445: AND wcti.move_transaction_id = wmta.transaction_id

Line 4442: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM

4438: AND wcti.process_status = WIP_CONSTANTS.PENDING
4439: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4440: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4441: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4442: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM
4443: AND wcti.group_id = wmti.group_id /* Bug 938039, 979553*/
4444: AND wcti.move_transaction_id = wmti.transaction_id
4445: AND wcti.move_transaction_id = wmta.transaction_id
4446: AND wcti.organization_id = wmta.organization_id

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

4454: AND wor.standard_rate_flag = wcti.standard_rate_flag
4455: AND wor.usage_rate_or_amount = wcti.usage_rate_or_amount;
4456:
4457: -- IF debug message level = 2, write statement below to log file
4458: IF (l_logLevel <= wip_constants.full_logging) THEN
4459: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4460: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4461: fnd_message.set_token('ENTITY2', 'WIP_TXN_ALLOCATIONS');
4462: l_msg := fnd_message.get;

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

4466:
4467: x_returnStatus := fnd_api.g_ret_sts_success;
4468:
4469: -- write to the log file
4470: IF (l_logLevel <= wip_constants.trace_logging) THEN
4471: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_alloc',
4472: p_procReturnStatus => x_returnStatus,
4473: p_msg => 'procedure complete',
4474: x_returnStatus => l_returnStatus);

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

4478: WHEN others THEN
4479: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4480: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
4481:
4482: IF (l_logLevel <= wip_constants.trace_logging) THEN
4483: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_txn_alloc',
4484: p_procReturnStatus => x_returnStatus,
4485: p_msg => l_errMsg,
4486: x_returnStatus => l_returnStatus);

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

4508: BEGIN
4509: l_move := p_gib.move_profile;
4510:
4511: -- write parameter value to log file
4512: IF (l_logLevel <= wip_constants.trace_logging) THEN
4513: l_params(1).paramName := 'p_group_id';
4514: l_params(1).paramValue := p_gib.group_id;
4515: l_params(2).paramName := 'p_txn_date';
4516: l_params(2).paramValue := p_gib.txn_date;

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

4549: x_returnStatus => l_returnStatus);
4550: END IF;
4551:
4552: -- Per item basis type for discrete jobs
4553: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
4554:
4555: INSERT INTO wip_cost_txn_interface
4556: (transaction_id,
4557: last_update_date,

Line 4627: WIP_CONSTANTS.RES_PROC, -- process_phase

4623: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
4624: p_gib.group_id,
4625: MAX(wmti.source_code),
4626: MAX(wmti.source_line_id),
4627: WIP_CONSTANTS.RES_PROC, -- process_phase
4628: WIP_CONSTANTS.PENDING, -- process_status
4629: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4630: MAX(wmti.organization_id),
4631: MAX(wmti.organization_code),

Line 4628: WIP_CONSTANTS.PENDING, -- process_status

4624: p_gib.group_id,
4625: MAX(wmti.source_code),
4626: MAX(wmti.source_line_id),
4627: WIP_CONSTANTS.RES_PROC, -- process_phase
4628: WIP_CONSTANTS.PENDING, -- process_status
4629: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4630: MAX(wmti.organization_id),
4631: MAX(wmti.organization_code),
4632: MAX(wmti.wip_entity_id),

Line 4629: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

4625: MAX(wmti.source_code),
4626: MAX(wmti.source_line_id),
4627: WIP_CONSTANTS.RES_PROC, -- process_phase
4628: WIP_CONSTANTS.PENDING, -- process_status
4629: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4630: MAX(wmti.organization_id),
4631: MAX(wmti.organization_code),
4632: MAX(wmti.wip_entity_id),
4633: MAX(wmti.entity_type),

Line 4648: WIP_CONSTANTS.PER_ITEM, -- basis_type

4644: NULL, -- resource_id
4645: NULL, -- resource_code
4646: MAX(wor.phantom_flag),
4647: NULL, -- usage_rate_or_amount
4648: WIP_CONSTANTS.PER_ITEM, -- basis_type
4649: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
4650: NULL, -- standard_rate_flag
4651: MAX(NVL(DECODE(wor.phantom_flag, 1, wro.quantity_per_assembly, 1)
4652: * wmti.primary_quantity *

Line 4649: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

4645: NULL, -- resource_code
4646: MAX(wor.phantom_flag),
4647: NULL, -- usage_rate_or_amount
4648: WIP_CONSTANTS.PER_ITEM, -- basis_type
4649: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
4650: NULL, -- standard_rate_flag
4651: MAX(NVL(DECODE(wor.phantom_flag, 1, wro.quantity_per_assembly, 1)
4652: * wmti.primary_quantity *
4653: DECODE(SIGN(wmti.to_operation_seq_num -

Line 4656: WIP_CONSTANTS.RUN),

4652: * wmti.primary_quantity *
4653: DECODE(SIGN(wmti.to_operation_seq_num -
4654: wmti.fm_operation_seq_num),
4655: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4656: WIP_CONSTANTS.RUN),
4657: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4658: WIP_CONSTANTS.RUN),1,1,-1),
4659: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4660: WIP_CONSTANTS.RUN),1,1,-1),

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

4654: wmti.fm_operation_seq_num),
4655: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4656: WIP_CONSTANTS.RUN),
4657: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4658: WIP_CONSTANTS.RUN),1,1,-1),
4659: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4660: WIP_CONSTANTS.RUN),1,1,-1),
4661: 1,-1),
4662: 1, 1,

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

4656: WIP_CONSTANTS.RUN),
4657: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4658: WIP_CONSTANTS.RUN),1,1,-1),
4659: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4660: WIP_CONSTANTS.RUN),1,1,-1),
4661: 1,-1),
4662: 1, 1,
4663: -1,-1)
4664: ,0)), -- transaction_quantity

Line 4671: WIP_CONSTANTS.RUN),

4667: * wmti.primary_quantity *
4668: DECODE(SIGN(wmti.to_operation_seq_num -
4669: wmti.fm_operation_seq_num),
4670: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4671: WIP_CONSTANTS.RUN),
4672: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4673: WIP_CONSTANTS.RUN),1,1,-1),
4674: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4675: WIP_CONSTANTS.RUN),1,1,-1),

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

4669: wmti.fm_operation_seq_num),
4670: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4671: WIP_CONSTANTS.RUN),
4672: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4673: WIP_CONSTANTS.RUN),1,1,-1),
4674: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4675: WIP_CONSTANTS.RUN),1,1,-1),
4676: 1,-1),
4677: 1, 1,

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

4671: WIP_CONSTANTS.RUN),
4672: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4673: WIP_CONSTANTS.RUN),1,1,-1),
4674: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4675: WIP_CONSTANTS.RUN),1,1,-1),
4676: 1,-1),
4677: 1, 1,
4678: -1,-1)
4679: ,0)), -- primary_quantity

Line 4703: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

4699: WHERE wmti.group_id = p_gib.group_id
4700: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4701: AND wdj.wip_entity_id = wmti.wip_entity_id
4702: AND wdj.organization_id = wmti.organization_id
4703: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4704: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4705: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4706: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4707: AND wop.organization_id = wmti.organization_id

Line 4704: AND wmti.process_status = WIP_CONSTANTS.RUNNING

4700: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4701: AND wdj.wip_entity_id = wmti.wip_entity_id
4702: AND wdj.organization_id = wmti.organization_id
4703: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4704: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4705: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4706: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4707: AND wop.organization_id = wmti.organization_id
4708: AND wop.wip_entity_id = wmti.wip_entity_id

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

4701: AND wdj.wip_entity_id = wmti.wip_entity_id
4702: AND wdj.organization_id = wmti.organization_id
4703: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4704: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4705: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4706: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4707: AND wop.organization_id = wmti.organization_id
4708: AND wop.wip_entity_id = wmti.wip_entity_id
4709: AND wop.organization_id = bd.organization_id

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

4702: AND wdj.organization_id = wmti.organization_id
4703: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4704: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4705: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4706: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4707: AND wop.organization_id = wmti.organization_id
4708: AND wop.wip_entity_id = wmti.wip_entity_id
4709: AND wop.organization_id = bd.organization_id
4710: AND NVL(wor.department_id, wop.department_id) = bd.department_id

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

4711: AND wop.organization_id = wor.organization_id(+)
4712: AND wop.wip_entity_id = wor.wip_entity_id(+)
4713: AND wop.operation_seq_num = wor.operation_seq_num(+)
4714: /* added for OSFM jump enhancement 2541431 */
4715: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
4716: AND wor.wip_entity_id = wro.wip_entity_id (+)
4717: AND wor.organization_id = wro.organization_id (+)
4718: /* Fixed bug 3881663. Op seq in wro is a negative number,
4719: * but op seq in wor is a positive number.*/

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

4727: )
4728: AND (
4729: (wop.operation_seq_num >= wmti.fm_operation_seq_num
4730: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4731: WIP_CONSTANTS.RUN),1,1,0)
4732: AND wop.operation_seq_num < wmti.to_operation_seq_num
4733: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4734: WIP_CONSTANTS.RUN),1,1,0)
4735: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

4730: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4731: WIP_CONSTANTS.RUN),1,1,0)
4732: AND wop.operation_seq_num < wmti.to_operation_seq_num
4733: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4734: WIP_CONSTANTS.RUN),1,1,0)
4735: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4736: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4737: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4738: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

4733: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4734: WIP_CONSTANTS.RUN),1,1,0)
4735: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4736: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4737: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4738: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4739: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4740: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4741: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

4734: WIP_CONSTANTS.RUN),1,1,0)
4735: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4736: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4737: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4738: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4739: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4740: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4741: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4742: AND wmti.to_intraoperation_step_type >

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

4735: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4736: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4737: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4738: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4739: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4740: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4741: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4742: AND wmti.to_intraoperation_step_type >
4743: WIP_CONSTANTS.RUN)))

Line 4743: WIP_CONSTANTS.RUN)))

4739: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4740: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4741: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4742: AND wmti.to_intraoperation_step_type >
4743: WIP_CONSTANTS.RUN)))
4744: OR
4745: (wop.operation_seq_num < wmti.fm_operation_seq_num
4746: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4747: WIP_CONSTANTS.RUN),1,1,0)

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

4743: WIP_CONSTANTS.RUN)))
4744: OR
4745: (wop.operation_seq_num < wmti.fm_operation_seq_num
4746: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4747: WIP_CONSTANTS.RUN),1,1,0)
4748: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4749: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4750: WIP_CONSTANTS.RUN),1,1,0)
4751: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

4746: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4747: WIP_CONSTANTS.RUN),1,1,0)
4748: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4749: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4750: WIP_CONSTANTS.RUN),1,1,0)
4751: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4752: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4753: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4754: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

4749: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4750: WIP_CONSTANTS.RUN),1,1,0)
4751: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4752: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4753: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4754: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4755: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4756: OR wop.operation_seq_num = wmti.to_operation_seq_num
4757: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

4750: WIP_CONSTANTS.RUN),1,1,0)
4751: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4752: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4753: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4754: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4755: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4756: OR wop.operation_seq_num = wmti.to_operation_seq_num
4757: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4758: AND wmti.fm_intraoperation_step_type >

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

4751: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4752: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4753: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4754: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4755: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4756: OR wop.operation_seq_num = wmti.to_operation_seq_num
4757: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4758: AND wmti.fm_intraoperation_step_type >
4759: WIP_CONSTANTS.RUN))))

Line 4759: WIP_CONSTANTS.RUN))))

4755: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4756: OR wop.operation_seq_num = wmti.to_operation_seq_num
4757: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4758: AND wmti.fm_intraoperation_step_type >
4759: WIP_CONSTANTS.RUN))))
4760: GROUP BY wop.wip_entity_id,
4761: wop.operation_seq_num,
4762: wor.department_id,/*Fixed bug 2834503*/
4763: wop.department_id,

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

4765: wor.phantom_op_seq_num,
4766: wmti.transaction_id; /* 2821017 */
4767:
4768: -- IF debug message level = 2, write statement below to log file
4769: IF (l_logLevel <= wip_constants.full_logging) THEN
4770: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4771: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4772: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4773: l_msg := fnd_message.get;

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

4777:
4778: END IF; --Per item basis type for discrete jobs
4779:
4780: -- Per item basis type for repetitive schedule
4781: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
4782:
4783: INSERT INTO wip_cost_txn_interface
4784: (transaction_id,
4785: last_update_date,

Line 4853: WIP_CONSTANTS.RES_PROC, -- process_phase

4849: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
4850: p_gib.group_id,
4851: MAX(wmti.source_code),
4852: MAX(wmti.source_line_id),
4853: WIP_CONSTANTS.RES_PROC, -- process_phase
4854: WIP_CONSTANTS.PENDING, -- process_status
4855: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4856: wmti.organization_id,
4857: MAX(wmti.organization_code),

Line 4854: WIP_CONSTANTS.PENDING, -- process_status

4850: p_gib.group_id,
4851: MAX(wmti.source_code),
4852: MAX(wmti.source_line_id),
4853: WIP_CONSTANTS.RES_PROC, -- process_phase
4854: WIP_CONSTANTS.PENDING, -- process_status
4855: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4856: wmti.organization_id,
4857: MAX(wmti.organization_code),
4858: wmti.wip_entity_id,

Line 4855: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

4851: MAX(wmti.source_code),
4852: MAX(wmti.source_line_id),
4853: WIP_CONSTANTS.RES_PROC, -- process_phase
4854: WIP_CONSTANTS.PENDING, -- process_status
4855: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4856: wmti.organization_id,
4857: MAX(wmti.organization_code),
4858: wmti.wip_entity_id,
4859: MAX(wmti.entity_type),

Line 4874: WIP_CONSTANTS.PER_ITEM, -- basis_type

4870: NULL, -- resource_id
4871: NULL, -- resource_code
4872: max(wor.phantom_flag),
4873: NULL, -- usage_rate_or_amount
4874: WIP_CONSTANTS.PER_ITEM, -- basis_type
4875: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
4876: NULL, -- standard_rate_flag
4877: SUM(NVL(wma.primary_quantity *
4878: DECODE(SIGN(wmti.to_operation_seq_num -

Line 4875: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

4871: NULL, -- resource_code
4872: max(wor.phantom_flag),
4873: NULL, -- usage_rate_or_amount
4874: WIP_CONSTANTS.PER_ITEM, -- basis_type
4875: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
4876: NULL, -- standard_rate_flag
4877: SUM(NVL(wma.primary_quantity *
4878: DECODE(SIGN(wmti.to_operation_seq_num -
4879: wmti.fm_operation_seq_num),

Line 4881: WIP_CONSTANTS.RUN),

4877: SUM(NVL(wma.primary_quantity *
4878: DECODE(SIGN(wmti.to_operation_seq_num -
4879: wmti.fm_operation_seq_num),
4880: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4881: WIP_CONSTANTS.RUN),
4882: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4883: WIP_CONSTANTS.RUN),1,1,-1),
4884: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4885: WIP_CONSTANTS.RUN),1,1,-1),

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

4879: wmti.fm_operation_seq_num),
4880: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4881: WIP_CONSTANTS.RUN),
4882: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4883: WIP_CONSTANTS.RUN),1,1,-1),
4884: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4885: WIP_CONSTANTS.RUN),1,1,-1),
4886: 1,-1),
4887: 1, 1,

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

4881: WIP_CONSTANTS.RUN),
4882: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4883: WIP_CONSTANTS.RUN),1,1,-1),
4884: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4885: WIP_CONSTANTS.RUN),1,1,-1),
4886: 1,-1),
4887: 1, 1,
4888: -1,-1)
4889: ,0)), -- transaction_quantity

Line 4895: WIP_CONSTANTS.RUN),

4891: SUM(NVL(wma.primary_quantity *
4892: DECODE(SIGN(wmti.to_operation_seq_num -
4893: wmti.fm_operation_seq_num),
4894: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4895: WIP_CONSTANTS.RUN),
4896: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4897: WIP_CONSTANTS.RUN),1,1,-1),
4898: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4899: WIP_CONSTANTS.RUN),1,1,-1),

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

4893: wmti.fm_operation_seq_num),
4894: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4895: WIP_CONSTANTS.RUN),
4896: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4897: WIP_CONSTANTS.RUN),1,1,-1),
4898: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4899: WIP_CONSTANTS.RUN),1,1,-1),
4900: 1,-1),
4901: 1, 1,

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

4895: WIP_CONSTANTS.RUN),
4896: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4897: WIP_CONSTANTS.RUN),1,1,-1),
4898: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4899: WIP_CONSTANTS.RUN),1,1,-1),
4900: 1,-1),
4901: 1, 1,
4902: -1,-1)
4903: ,0)), -- primary_quantity

Line 4922: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

4918: wip_move_txn_interface wmti,
4919: wip_operation_resources wor
4920: WHERE wmti.group_id = p_gib.group_id
4921: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4922: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4923: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4924: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4925: AND wop.organization_id = wmti.organization_id
4926: AND wop.wip_entity_id = wmti.wip_entity_id

Line 4923: AND wmti.process_status = WIP_CONSTANTS.RUNNING

4919: wip_operation_resources wor
4920: WHERE wmti.group_id = p_gib.group_id
4921: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4922: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4923: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4924: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4925: AND wop.organization_id = wmti.organization_id
4926: AND wop.wip_entity_id = wmti.wip_entity_id
4927: AND wmti.organization_id = wma.organization_id

Line 4924: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

4920: WHERE wmti.group_id = p_gib.group_id
4921: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4922: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4923: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4924: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4925: AND wop.organization_id = wmti.organization_id
4926: AND wop.wip_entity_id = wmti.wip_entity_id
4927: AND wmti.organization_id = wma.organization_id
4928: AND wmti.transaction_id = wma.transaction_id

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

4935: AND wor.repetitive_schedule_id = wop.repetitive_schedule_id
4936: AND (
4937: (wop.operation_seq_num >= wmti.fm_operation_seq_num
4938: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4939: WIP_CONSTANTS.RUN),1,1,0)
4940: AND wop.operation_seq_num < wmti.to_operation_seq_num
4941: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4942: WIP_CONSTANTS.RUN),1,1,0)
4943: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

4938: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4939: WIP_CONSTANTS.RUN),1,1,0)
4940: AND wop.operation_seq_num < wmti.to_operation_seq_num
4941: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4942: WIP_CONSTANTS.RUN),1,1,0)
4943: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4944: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4945: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4946: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

4941: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4942: WIP_CONSTANTS.RUN),1,1,0)
4943: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4944: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4945: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4946: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4947: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4948: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4949: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

4942: WIP_CONSTANTS.RUN),1,1,0)
4943: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4944: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4945: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4946: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4947: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4948: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4949: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4950: AND wmti.to_intraoperation_step_type >

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

4943: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4944: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4945: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4946: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4947: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4948: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4949: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4950: AND wmti.to_intraoperation_step_type >
4951: WIP_CONSTANTS.RUN)))

Line 4951: WIP_CONSTANTS.RUN)))

4947: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4948: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4949: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4950: AND wmti.to_intraoperation_step_type >
4951: WIP_CONSTANTS.RUN)))
4952: OR
4953: (wop.operation_seq_num < wmti.fm_operation_seq_num
4954: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4955: WIP_CONSTANTS.RUN),1,1,0)

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

4951: WIP_CONSTANTS.RUN)))
4952: OR
4953: (wop.operation_seq_num < wmti.fm_operation_seq_num
4954: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4955: WIP_CONSTANTS.RUN),1,1,0)
4956: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4957: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4958: WIP_CONSTANTS.RUN),1,1,0)
4959: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

4954: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4955: WIP_CONSTANTS.RUN),1,1,0)
4956: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4957: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4958: WIP_CONSTANTS.RUN),1,1,0)
4959: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4960: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4961: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4962: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

4957: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4958: WIP_CONSTANTS.RUN),1,1,0)
4959: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4960: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4961: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4962: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4963: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4964: OR wop.operation_seq_num = wmti.to_operation_seq_num
4965: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

4958: WIP_CONSTANTS.RUN),1,1,0)
4959: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4960: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4961: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4962: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4963: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4964: OR wop.operation_seq_num = wmti.to_operation_seq_num
4965: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4966: AND wmti.fm_intraoperation_step_type >

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

4959: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4960: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4961: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4962: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4963: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4964: OR wop.operation_seq_num = wmti.to_operation_seq_num
4965: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4966: AND wmti.fm_intraoperation_step_type >
4967: WIP_CONSTANTS.RUN))))

Line 4967: WIP_CONSTANTS.RUN))))

4963: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4964: OR wop.operation_seq_num = wmti.to_operation_seq_num
4965: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4966: AND wmti.fm_intraoperation_step_type >
4967: WIP_CONSTANTS.RUN))))
4968: GROUP BY wmti.organization_id,
4969: wmti.wip_entity_id,
4970: wmti.line_id,
4971: wor.operation_seq_num,

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

4975: wor.phantom_item_id,
4976: wor.phantom_op_seq_num;
4977:
4978: -- IF debug message level = 2, write statement below to log file
4979: IF (l_logLevel <= wip_constants.full_logging) THEN
4980: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4981: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4982: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4983: l_msg := fnd_message.get;

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

4994: | wmti.reason_id, wmti.reference may not make sense since they are
4995: | tied to the transaction_id. NULL them out [24-JUL-92, John, Djuki.
4996: | We have more than one record per op_seq because of quantity_completed
4997: +----------------------------------------------------------------------*/
4998: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
4999:
5000: INSERT INTO wip_cost_txn_interface
5001: (transaction_id,
5002: last_update_date,

Line 5072: WIP_CONSTANTS.RES_PROC, -- process_phase

5068: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
5069: p_gib.group_id,
5070: MAX(wmti.source_code), -- source_code
5071: MAX(wmti.source_line_id), -- source_line_id
5072: WIP_CONSTANTS.RES_PROC, -- process_phase
5073: WIP_CONSTANTS.PENDING, -- process_status
5074: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5075: wmti.organization_id,
5076: MAX(wmti.organization_code),

Line 5073: WIP_CONSTANTS.PENDING, -- process_status

5069: p_gib.group_id,
5070: MAX(wmti.source_code), -- source_code
5071: MAX(wmti.source_line_id), -- source_line_id
5072: WIP_CONSTANTS.RES_PROC, -- process_phase
5073: WIP_CONSTANTS.PENDING, -- process_status
5074: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5075: wmti.organization_id,
5076: MAX(wmti.organization_code),
5077: wmti.wip_entity_id,

Line 5074: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

5070: MAX(wmti.source_code), -- source_code
5071: MAX(wmti.source_line_id), -- source_line_id
5072: WIP_CONSTANTS.RES_PROC, -- process_phase
5073: WIP_CONSTANTS.PENDING, -- process_status
5074: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5075: wmti.organization_id,
5076: MAX(wmti.organization_code),
5077: wmti.wip_entity_id,
5078: MAX(entity_type),

Line 5093: WIP_CONSTANTS.PER_LOT, -- basis_type

5089: NULL, -- resource_id
5090: NULL, -- resource_code
5091: MAX(wor.phantom_flag),
5092: NULL, -- usage_rate_or_amount
5093: WIP_CONSTANTS.PER_LOT, -- basis_type
5094: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5095: NULL, -- standard_rate_flag
5096: DECODE(SIGN(MAX(wop.quantity_completed) +
5097: /* Fixed bug 3740010 change from "NVL(SUM(wmti.primary_quantity"

Line 5094: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

5090: NULL, -- resource_code
5091: MAX(wor.phantom_flag),
5092: NULL, -- usage_rate_or_amount
5093: WIP_CONSTANTS.PER_LOT, -- basis_type
5094: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5095: NULL, -- standard_rate_flag
5096: DECODE(SIGN(MAX(wop.quantity_completed) +
5097: /* Fixed bug 3740010 change from "NVL(SUM(wmti.primary_quantity"
5098: * to "NVL(MAX(wmti.primary_quantity" because there may be

Line 5105: WIP_CONSTANTS.RUN),

5101: NVL(MAX(wmti.primary_quantity *
5102: DECODE(SIGN(wmti.to_operation_seq_num -
5103: wmti.fm_operation_seq_num),
5104: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5105: WIP_CONSTANTS.RUN),
5106: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5107: WIP_CONSTANTS.RUN),1,1,-1),
5108: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5109: WIP_CONSTANTS.RUN),1,1,-1),

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

5103: wmti.fm_operation_seq_num),
5104: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5105: WIP_CONSTANTS.RUN),
5106: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5107: WIP_CONSTANTS.RUN),1,1,-1),
5108: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5109: WIP_CONSTANTS.RUN),1,1,-1),
5110: 1,-1),
5111: 1, 1,

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

5105: WIP_CONSTANTS.RUN),
5106: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5107: WIP_CONSTANTS.RUN),1,1,-1),
5108: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5109: WIP_CONSTANTS.RUN),1,1,-1),
5110: 1,-1),
5111: 1, 1,
5112: -1,-1)
5113: ),0)), -- transaction_quantity

Line 5127: WIP_CONSTANTS.RUN),

5123: NVL(MAX(wmti.primary_quantity *
5124: DECODE(SIGN(wmti.to_operation_seq_num -
5125: wmti.fm_operation_seq_num),
5126: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5127: WIP_CONSTANTS.RUN),
5128: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5129: WIP_CONSTANTS.RUN),1,1,-1),
5130: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5131: WIP_CONSTANTS.RUN),1,1,-1),

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

5125: wmti.fm_operation_seq_num),
5126: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5127: WIP_CONSTANTS.RUN),
5128: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5129: WIP_CONSTANTS.RUN),1,1,-1),
5130: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5131: WIP_CONSTANTS.RUN),1,1,-1),
5132: 1,-1),
5133: 1, 1,

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

5127: WIP_CONSTANTS.RUN),
5128: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5129: WIP_CONSTANTS.RUN),1,1,-1),
5130: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5131: WIP_CONSTANTS.RUN),1,1,-1),
5132: 1,-1),
5133: 1, 1,
5134: -1,-1)
5135: ),0)), -- primary_quantity

Line 5159: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5155: wip_discrete_jobs wdj,
5156: wip_move_txn_interface wmti
5157: WHERE wmti.group_id = p_gib.group_id
5158: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5159: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5160: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5161: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5162: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5163: AND wdj.wip_entity_id = wmti.wip_entity_id

Line 5160: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5156: wip_move_txn_interface wmti
5157: WHERE wmti.group_id = p_gib.group_id
5158: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5159: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5160: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5161: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5162: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5163: AND wdj.wip_entity_id = wmti.wip_entity_id
5164: AND wdj.organization_id = wmti.organization_id

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

5157: WHERE wmti.group_id = p_gib.group_id
5158: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5159: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5160: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5161: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5162: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5163: AND wdj.wip_entity_id = wmti.wip_entity_id
5164: AND wdj.organization_id = wmti.organization_id
5165: AND wop.organization_id = wmti.organization_id

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

5158: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5159: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5160: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5161: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5162: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5163: AND wdj.wip_entity_id = wmti.wip_entity_id
5164: AND wdj.organization_id = wmti.organization_id
5165: AND wop.organization_id = wmti.organization_id
5166: AND wop.wip_entity_id = wmti.wip_entity_id

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

5169: AND wop.organization_id = wor.organization_id(+)
5170: AND wop.wip_entity_id = wor.wip_entity_id(+)
5171: AND wop.operation_seq_num = wor.operation_seq_num(+)
5172: /* added for OSFM jump enhancement 2541431 */
5173: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
5174: /*bug 3930251 -> insert into WCTI only if there are records in CDO)*/
5175: AND EXISTS
5176: ( SELECT 1 FROM cst_department_overheads cdo
5177: WHERE cdo.organization_id = bd.organization_id

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

5179: )
5180: AND (
5181: (wop.operation_seq_num >= wmti.fm_operation_seq_num
5182: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5183: WIP_CONSTANTS.RUN),1,1,0)
5184: AND wop.operation_seq_num < wmti.to_operation_seq_num
5185: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5186: WIP_CONSTANTS.RUN),1,1,0)
5187: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

5182: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5183: WIP_CONSTANTS.RUN),1,1,0)
5184: AND wop.operation_seq_num < wmti.to_operation_seq_num
5185: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5186: WIP_CONSTANTS.RUN),1,1,0)
5187: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5188: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5189: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5190: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

5185: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5186: WIP_CONSTANTS.RUN),1,1,0)
5187: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5188: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5189: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5190: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5191: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5192: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5193: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

5186: WIP_CONSTANTS.RUN),1,1,0)
5187: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5188: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5189: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5190: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5191: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5192: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5193: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5194: AND wmti.to_intraoperation_step_type >

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

5187: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5188: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5189: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5190: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5191: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5192: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5193: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5194: AND wmti.to_intraoperation_step_type >
5195: WIP_CONSTANTS.RUN)))

Line 5195: WIP_CONSTANTS.RUN)))

5191: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5192: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5193: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5194: AND wmti.to_intraoperation_step_type >
5195: WIP_CONSTANTS.RUN)))
5196: OR
5197: (wop.operation_seq_num < wmti.fm_operation_seq_num
5198: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5199: WIP_CONSTANTS.RUN),1,1,0)

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

5195: WIP_CONSTANTS.RUN)))
5196: OR
5197: (wop.operation_seq_num < wmti.fm_operation_seq_num
5198: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5199: WIP_CONSTANTS.RUN),1,1,0)
5200: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5201: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5202: WIP_CONSTANTS.RUN),1,1,0)
5203: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

5198: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5199: WIP_CONSTANTS.RUN),1,1,0)
5200: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5201: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5202: WIP_CONSTANTS.RUN),1,1,0)
5203: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5204: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5205: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5206: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

5201: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5202: WIP_CONSTANTS.RUN),1,1,0)
5203: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5204: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5205: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5206: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5207: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5208: OR wop.operation_seq_num = wmti.to_operation_seq_num
5209: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

5202: WIP_CONSTANTS.RUN),1,1,0)
5203: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5204: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5205: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5206: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5207: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5208: OR wop.operation_seq_num = wmti.to_operation_seq_num
5209: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5210: AND wmti.fm_intraoperation_step_type >

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

5203: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5204: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5205: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5206: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5207: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5208: OR wop.operation_seq_num = wmti.to_operation_seq_num
5209: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5210: AND wmti.fm_intraoperation_step_type >
5211: WIP_CONSTANTS.RUN))))

Line 5211: WIP_CONSTANTS.RUN))))

5207: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5208: OR wop.operation_seq_num = wmti.to_operation_seq_num
5209: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5210: AND wmti.fm_intraoperation_step_type >
5211: WIP_CONSTANTS.RUN))))
5212: GROUP BY wmti.organization_id,
5213: wmti.wip_entity_id,
5214: wop.operation_seq_num,
5215: wor.phantom_item_id, --Bug 5213164:Added to take care of multiple phantoms

Line 5229: WIP_CONSTANTS.RUN),

5225: NVL(MAX(wmti.primary_quantity *
5226: DECODE(SIGN(wmti.to_operation_seq_num -
5227: wmti.fm_operation_seq_num),
5228: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5229: WIP_CONSTANTS.RUN),
5230: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5231: WIP_CONSTANTS.RUN),1,1,-1),
5232: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5233: WIP_CONSTANTS.RUN),1,1,-1),

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

5227: wmti.fm_operation_seq_num),
5228: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5229: WIP_CONSTANTS.RUN),
5230: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5231: WIP_CONSTANTS.RUN),1,1,-1),
5232: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5233: WIP_CONSTANTS.RUN),1,1,-1),
5234: 1,-1),
5235: 1, 1,

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

5229: WIP_CONSTANTS.RUN),
5230: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5231: WIP_CONSTANTS.RUN),1,1,-1),
5232: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5233: WIP_CONSTANTS.RUN),1,1,-1),
5234: 1,-1),
5235: 1, 1,
5236: -1,-1)
5237: ),0)), -- NVL

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

5239: 1, DECODE(sign(MAX(wop.quantity_completed)),1,0,1),
5240: -1, DECODE(sign(MAX(wop.quantity_completed)),1,-1,0));
5241:
5242: -- IF debug message level = 2, write statement below to log file
5243: IF (l_logLevel <= wip_constants.full_logging) THEN
5244: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
5245: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5246: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5247: l_msg := fnd_message.get;

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

5251:
5252: END IF; -- Per order basis type for discrete jobs
5253:
5254: -- Per order basis type for repetitive
5255: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
5256:
5257: INSERT INTO wip_cost_txn_interface
5258: (transaction_id,
5259: last_update_date,

Line 5328: WIP_CONSTANTS.RES_PROC, -- process_phase

5324: p_gib.group_id,
5325: MAX(wmti.source_code), -- source_code
5326: -- Fixed bug 2465148
5327: MAX(wmti.source_line_id), -- source_line_id
5328: WIP_CONSTANTS.RES_PROC, -- process_phase
5329: WIP_CONSTANTS.PENDING, -- process_status
5330: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5331: wmti.organization_id,
5332: MAX(wmti.organization_code),

Line 5329: WIP_CONSTANTS.PENDING, -- process_status

5325: MAX(wmti.source_code), -- source_code
5326: -- Fixed bug 2465148
5327: MAX(wmti.source_line_id), -- source_line_id
5328: WIP_CONSTANTS.RES_PROC, -- process_phase
5329: WIP_CONSTANTS.PENDING, -- process_status
5330: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5331: wmti.organization_id,
5332: MAX(wmti.organization_code),
5333: wmti.wip_entity_id,

Line 5330: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

5326: -- Fixed bug 2465148
5327: MAX(wmti.source_line_id), -- source_line_id
5328: WIP_CONSTANTS.RES_PROC, -- process_phase
5329: WIP_CONSTANTS.PENDING, -- process_status
5330: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5331: wmti.organization_id,
5332: MAX(wmti.organization_code),
5333: wmti.wip_entity_id,
5334: MAX(entity_type),

Line 5349: WIP_CONSTANTS.PER_LOT, -- basis_type

5345: NULL, -- resource_id
5346: NULL, -- resource_code
5347: MAX(wor.phantom_flag),
5348: NULL, -- usage_rate_or_amount
5349: WIP_CONSTANTS.PER_LOT, -- basis_type
5350: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5351: NULL, -- standard_rate_flag
5352: 1, -- transaction_quantity
5353: MAX(wmti.primary_uom), -- transaction_uom

Line 5350: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

5346: NULL, -- resource_code
5347: MAX(wor.phantom_flag),
5348: NULL, -- usage_rate_or_amount
5349: WIP_CONSTANTS.PER_LOT, -- basis_type
5350: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5351: NULL, -- standard_rate_flag
5352: 1, -- transaction_quantity
5353: MAX(wmti.primary_uom), -- transaction_uom
5354: 1, -- primary_quantity

Line 5374: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5370: wip_move_txn_interface wmti,
5371: wip_operation_resources wor
5372: WHERE wmti.group_id = p_gib.group_id
5373: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5374: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5375: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5376: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5377: AND wop.organization_id = wmti.organization_id
5378: AND wop.wip_entity_id = wmti.wip_entity_id

Line 5375: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5371: wip_operation_resources wor
5372: WHERE wmti.group_id = p_gib.group_id
5373: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5374: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5375: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5376: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5377: AND wop.organization_id = wmti.organization_id
5378: AND wop.wip_entity_id = wmti.wip_entity_id
5379: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id

Line 5376: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

5372: WHERE wmti.group_id = p_gib.group_id
5373: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5374: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5375: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5376: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5377: AND wop.organization_id = wmti.organization_id
5378: AND wop.wip_entity_id = wmti.wip_entity_id
5379: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
5380: AND wmti.organization_id = wma.organization_id

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

5387: AND wor.repetitive_schedule_id = wop.repetitive_schedule_id
5388: AND (
5389: (wop.operation_seq_num >= wmti.fm_operation_seq_num
5390: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5391: WIP_CONSTANTS.RUN),1,1,0)
5392: AND wop.operation_seq_num < wmti.to_operation_seq_num
5393: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5394: WIP_CONSTANTS.RUN),1,1,0)
5395: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

5390: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5391: WIP_CONSTANTS.RUN),1,1,0)
5392: AND wop.operation_seq_num < wmti.to_operation_seq_num
5393: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5394: WIP_CONSTANTS.RUN),1,1,0)
5395: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5396: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5397: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5398: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

5393: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5394: WIP_CONSTANTS.RUN),1,1,0)
5395: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5396: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5397: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5398: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5399: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5400: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5401: OR (wop.operation_seq_num = wmti.to_operation_seq_num

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

5394: WIP_CONSTANTS.RUN),1,1,0)
5395: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5396: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5397: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5398: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5399: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5400: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5401: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5402: AND wmti.to_intraoperation_step_type >

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

5395: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5396: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5397: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5398: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5399: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5400: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5401: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5402: AND wmti.to_intraoperation_step_type >
5403: WIP_CONSTANTS.RUN)))

Line 5403: WIP_CONSTANTS.RUN)))

5399: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5400: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5401: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5402: AND wmti.to_intraoperation_step_type >
5403: WIP_CONSTANTS.RUN)))
5404: OR
5405: (wop.operation_seq_num < wmti.fm_operation_seq_num
5406: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5407: WIP_CONSTANTS.RUN),1,1,0)

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

5403: WIP_CONSTANTS.RUN)))
5404: OR
5405: (wop.operation_seq_num < wmti.fm_operation_seq_num
5406: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5407: WIP_CONSTANTS.RUN),1,1,0)
5408: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5409: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5410: WIP_CONSTANTS.RUN),1,1,0)
5411: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

5406: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5407: WIP_CONSTANTS.RUN),1,1,0)
5408: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5409: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5410: WIP_CONSTANTS.RUN),1,1,0)
5411: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5412: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5413: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5414: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

5409: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5410: WIP_CONSTANTS.RUN),1,1,0)
5411: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5412: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5413: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5414: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5415: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5416: OR wop.operation_seq_num = wmti.to_operation_seq_num
5417: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

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

5410: WIP_CONSTANTS.RUN),1,1,0)
5411: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5412: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5413: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5414: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5415: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5416: OR wop.operation_seq_num = wmti.to_operation_seq_num
5417: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5418: AND wmti.fm_intraoperation_step_type >

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

5411: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5412: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5413: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5414: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5415: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5416: OR wop.operation_seq_num = wmti.to_operation_seq_num
5417: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5418: AND wmti.fm_intraoperation_step_type >
5419: WIP_CONSTANTS.RUN))))

Line 5419: WIP_CONSTANTS.RUN))))

5415: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5416: OR wop.operation_seq_num = wmti.to_operation_seq_num
5417: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5418: AND wmti.fm_intraoperation_step_type >
5419: WIP_CONSTANTS.RUN))))
5420: GROUP BY wmti.organization_id,
5421: wmti.wip_entity_id,
5422: wmti.line_id,
5423: wma.repetitive_schedule_id,

Line 5435: WIP_CONSTANTS.RUN),

5431: NVL(SUM(wma.primary_quantity *
5432: DECODE(SIGN(wmti.to_operation_seq_num -
5433: wmti.fm_operation_seq_num),
5434: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5435: WIP_CONSTANTS.RUN),
5436: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5437: WIP_CONSTANTS.RUN),1,1,-1),
5438: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5439: WIP_CONSTANTS.RUN),1,1,-1),

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

5433: wmti.fm_operation_seq_num),
5434: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5435: WIP_CONSTANTS.RUN),
5436: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5437: WIP_CONSTANTS.RUN),1,1,-1),
5438: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5439: WIP_CONSTANTS.RUN),1,1,-1),
5440: 1,-1),
5441: 1, 1,

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

5435: WIP_CONSTANTS.RUN),
5436: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5437: WIP_CONSTANTS.RUN),1,1,-1),
5438: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5439: WIP_CONSTANTS.RUN),1,1,-1),
5440: 1,-1),
5441: 1, 1,
5442: -1,-1)
5443: ),0)),

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

5445: 1, DECODE(sign(MAX(wop.quantity_completed)),1,0,1),
5446: -1, DECODE(sign(MAX(wop.quantity_completed)),1,-1,0));
5447:
5448: -- IF debug message level = 2, write statement below to log file
5449: IF (l_logLevel <= wip_constants.full_logging) THEN
5450: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
5451: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5452: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5453: l_msg := fnd_message.get;

Line 5468: AND transaction_type = WIP_CONSTANTS.OVHD_TXN;

5464: UPDATE wip_cost_txn_interface
5465: SET transaction_id = wip_transactions_s.nextval
5466: WHERE group_id = p_gib.group_id
5467: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
5468: AND transaction_type = WIP_CONSTANTS.OVHD_TXN;
5469:
5470: -- IF debug message level = 2, write statement below to log file
5471: IF (l_logLevel <= wip_constants.full_logging) THEN
5472: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

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

5467: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
5468: AND transaction_type = WIP_CONSTANTS.OVHD_TXN;
5469:
5470: -- IF debug message level = 2, write statement below to log file
5471: IF (l_logLevel <= wip_constants.full_logging) THEN
5472: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
5473: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5474: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5475: l_msg := fnd_message.get;

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

5477: x_returnStatus => l_returnStatus);
5478: END IF;
5479:
5480: -- For repetitive
5481: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
5482:
5483: /*------------------------------------------------------------+
5484: | Insert into cost allocations for repetitive schedules |
5485: | per lot

Line 5533: WIP_CONSTANTS.RUN),

5529: NVL(SUM(wma.primary_quantity *
5530: DECODE(SIGN(wmti.to_operation_seq_num -
5531: wmti.fm_operation_seq_num),
5532: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5533: WIP_CONSTANTS.RUN),
5534: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5535: WIP_CONSTANTS.RUN),1,1,-1),
5536: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5537: WIP_CONSTANTS.RUN),1,1,-1),

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

5531: wmti.fm_operation_seq_num),
5532: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5533: WIP_CONSTANTS.RUN),
5534: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5535: WIP_CONSTANTS.RUN),1,1,-1),
5536: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5537: WIP_CONSTANTS.RUN),1,1,-1),
5538: 1,-1),
5539: 1, 1,

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

5533: WIP_CONSTANTS.RUN),
5534: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5535: WIP_CONSTANTS.RUN),1,1,-1),
5536: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5537: WIP_CONSTANTS.RUN),1,1,-1),
5538: 1,-1),
5539: 1, 1,
5540: -1,-1)
5541: ),0)), -- transaction_quantity

Line 5550: WIP_CONSTANTS.RUN),

5546: NVL(SUM(wma.primary_quantity *
5547: DECODE(SIGN(wmti.to_operation_seq_num -
5548: wmti.fm_operation_seq_num),
5549: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5550: WIP_CONSTANTS.RUN),
5551: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5552: WIP_CONSTANTS.RUN),1,1,-1),
5553: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5554: WIP_CONSTANTS.RUN),1,1,-1),

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

5548: wmti.fm_operation_seq_num),
5549: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5550: WIP_CONSTANTS.RUN),
5551: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5552: WIP_CONSTANTS.RUN),1,1,-1),
5553: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5554: WIP_CONSTANTS.RUN),1,1,-1),
5555: 1,-1),
5556: 1, 1,

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

5550: WIP_CONSTANTS.RUN),
5551: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5552: WIP_CONSTANTS.RUN),1,1,-1),
5553: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5554: WIP_CONSTANTS.RUN),1,1,-1),
5555: 1,-1),
5556: 1, 1,
5557: -1,-1)
5558: ),0)), -- primary_quantity

Line 5568: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5564: wip_cost_txn_interface wci,
5565: wip_move_txn_interface wmti
5566: WHERE wmti.group_id = p_gib.group_id
5567: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5568: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5569: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5570: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5571: AND wmti.group_id = wci.group_id
5572: AND wci.organization_id = wmti.organization_id

Line 5569: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5565: wip_move_txn_interface wmti
5566: WHERE wmti.group_id = p_gib.group_id
5567: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5568: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5569: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5570: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5571: AND wmti.group_id = wci.group_id
5572: AND wci.organization_id = wmti.organization_id
5573: AND wci.wip_entity_id = wmti.wip_entity_id

Line 5570: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

5566: WHERE wmti.group_id = p_gib.group_id
5567: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5568: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5569: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5570: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5571: AND wmti.group_id = wci.group_id
5572: AND wci.organization_id = wmti.organization_id
5573: AND wci.wip_entity_id = wmti.wip_entity_id
5574: AND wci.operation_seq_num = wop.operation_seq_num

Line 5575: AND wci.basis_type = WIP_CONSTANTS.PER_LOT

5571: AND wmti.group_id = wci.group_id
5572: AND wci.organization_id = wmti.organization_id
5573: AND wci.wip_entity_id = wmti.wip_entity_id
5574: AND wci.operation_seq_num = wop.operation_seq_num
5575: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
5576: AND wci.transaction_type = WIP_CONSTANTS.OVHD_TXN
5577: AND wop.organization_id = wmti.organization_id
5578: AND wop.wip_entity_id = wmti.wip_entity_id
5579: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id

Line 5576: AND wci.transaction_type = WIP_CONSTANTS.OVHD_TXN

5572: AND wci.organization_id = wmti.organization_id
5573: AND wci.wip_entity_id = wmti.wip_entity_id
5574: AND wci.operation_seq_num = wop.operation_seq_num
5575: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
5576: AND wci.transaction_type = WIP_CONSTANTS.OVHD_TXN
5577: AND wop.organization_id = wmti.organization_id
5578: AND wop.wip_entity_id = wmti.wip_entity_id
5579: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
5580: AND wmti.organization_id = wma.organization_id

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

5583: GROUP BY wci.transaction_id,
5584: wma.repetitive_schedule_id;
5585:
5586: -- IF debug message level = 2, write statement below to log file
5587: IF (l_logLevel <= wip_constants.full_logging) THEN
5588: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
5589: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5590: fnd_message.set_token('ENTITY2', 'WIP_TXN_ALLOCATIONS');
5591: l_msg := fnd_message.get;

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

5597:
5598: x_returnStatus := fnd_api.g_ret_sts_success;
5599:
5600: -- write to the log file
5601: IF (l_logLevel <= wip_constants.trace_logging) THEN
5602: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_dept_overhead',
5603: p_procReturnStatus => x_returnStatus,
5604: p_msg => 'procedure complete',
5605: x_returnStatus => l_returnStatus);

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

5609: WHEN others THEN
5610: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
5611: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
5612:
5613: IF (l_logLevel <= wip_constants.trace_logging) THEN
5614: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_dept_overhead',
5615: p_procReturnStatus => x_returnStatus,
5616: p_msg => l_errMsg,
5617: x_returnStatus => l_returnStatus);

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

5636: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
5637:
5638: BEGIN
5639: -- write parameter value to log file
5640: IF (l_logLevel <= wip_constants.trace_logging) THEN
5641: l_params(1).paramName := 'p_group_id';
5642: l_params(1).paramValue := p_gib.group_id;
5643: l_params(2).paramName := 'p_txn_date';
5644: l_params(2).paramValue := p_gib.txn_date;

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

5652: WHERE group_id = p_gib.group_id
5653: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date);
5654:
5655: -- IF debug message level = 2, write statement below to log file
5656: IF (l_logLevel <= wip_constants.full_logging) THEN
5657: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
5658: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5659: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5660: l_msg := fnd_message.get;

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

5664:
5665: x_returnStatus := fnd_api.g_ret_sts_success;
5666:
5667: -- write to the log file
5668: IF (l_logLevel <= wip_constants.trace_logging) THEN
5669: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.release_cost_txn',
5670: p_procReturnStatus => x_returnStatus,
5671: p_msg => 'procedure complete',
5672: x_returnStatus => l_returnStatus);

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

5676: WHEN others THEN
5677: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
5678: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
5679:
5680: IF (l_logLevel <= wip_constants.trace_logging) THEN
5681: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.release_cost_txn',
5682: p_procReturnStatus => x_returnStatus,
5683: p_msg => l_errMsg,
5684: x_returnStatus => l_returnStatus);

Line 5713: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5709: wip_operations wo,
5710: wip_operation_resources wor,
5711: wip_discrete_jobs wdj
5712: WHERE wmti.group_id = p_group_id
5713: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5714: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5715: AND wmti.overcompletion_transaction_qty IS NOT NULL
5716: AND wdj.wip_entity_id = wmti.wip_entity_id
5717: AND wdj.organization_id = wmti.organization_id

Line 5714: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5710: wip_operation_resources wor,
5711: wip_discrete_jobs wdj
5712: WHERE wmti.group_id = p_group_id
5713: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5714: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5715: AND wmti.overcompletion_transaction_qty IS NOT NULL
5716: AND wdj.wip_entity_id = wmti.wip_entity_id
5717: AND wdj.organization_id = wmti.organization_id
5718: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE

Line 5718: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE

5714: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5715: AND wmti.overcompletion_transaction_qty IS NOT NULL
5716: AND wdj.wip_entity_id = wmti.wip_entity_id
5717: AND wdj.organization_id = wmti.organization_id
5718: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE
5719: AND wo.wip_entity_id = wmti.wip_entity_id
5720: AND wo.organization_id = wmti.organization_id
5721: AND wo.operation_seq_num > wmti.fm_operation_seq_num
5722: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL

Line 5722: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL

5718: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE
5719: AND wo.wip_entity_id = wmti.wip_entity_id
5720: AND wo.organization_id = wmti.organization_id
5721: AND wo.operation_seq_num > wmti.fm_operation_seq_num
5722: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL
5723: AND wor.wip_entity_id = wo.wip_entity_id
5724: AND wor.organization_id = wo.organization_id
5725: AND wor.operation_seq_num = wo.operation_seq_num
5726: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,

Line 5726: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,

5722: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL
5723: AND wor.wip_entity_id = wo.wip_entity_id
5724: AND wor.organization_id = wo.organization_id
5725: AND wor.operation_seq_num = wo.operation_seq_num
5726: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5727: WIP_CONSTANTS.PO_MOVE)
5728: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5729:
5730: UNION

Line 5727: WIP_CONSTANTS.PO_MOVE)

5723: AND wor.wip_entity_id = wo.wip_entity_id
5724: AND wor.organization_id = wo.organization_id
5725: AND wor.operation_seq_num = wo.operation_seq_num
5726: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5727: WIP_CONSTANTS.PO_MOVE)
5728: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5729:
5730: UNION
5731:

Line 5728: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

5724: AND wor.organization_id = wo.organization_id
5725: AND wor.operation_seq_num = wo.operation_seq_num
5726: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5727: WIP_CONSTANTS.PO_MOVE)
5728: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5729:
5730: UNION
5731:
5732: SELECT distinct wmti.wip_entity_id wip_id,

Line 5742: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5738: wip_operations wo,
5739: wip_operation_resources wor,
5740: wip_repetitive_schedules wrs
5741: WHERE wmti.group_id = p_group_id
5742: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5743: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5744: AND wmti.overcompletion_transaction_qty IS NOT NULL
5745: AND wrs.wip_entity_id = wmti.wip_entity_id
5746: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id

Line 5743: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5739: wip_operation_resources wor,
5740: wip_repetitive_schedules wrs
5741: WHERE wmti.group_id = p_group_id
5742: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5743: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5744: AND wmti.overcompletion_transaction_qty IS NOT NULL
5745: AND wrs.wip_entity_id = wmti.wip_entity_id
5746: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
5747: AND wrs.organization_id = wmti.organization_id

Line 5748: AND wrs.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE

5744: AND wmti.overcompletion_transaction_qty IS NOT NULL
5745: AND wrs.wip_entity_id = wmti.wip_entity_id
5746: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
5747: AND wrs.organization_id = wmti.organization_id
5748: AND wrs.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE
5749: AND wo.wip_entity_id = wmti.wip_entity_id
5750: AND wo.repetitive_schedule_id = wmti.repetitive_schedule_id
5751: AND wo.organization_id = wmti.organization_id
5752: AND wo.operation_seq_num > wmti.fm_operation_seq_num

Line 5753: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL

5749: AND wo.wip_entity_id = wmti.wip_entity_id
5750: AND wo.repetitive_schedule_id = wmti.repetitive_schedule_id
5751: AND wo.organization_id = wmti.organization_id
5752: AND wo.operation_seq_num > wmti.fm_operation_seq_num
5753: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL
5754: AND wor.wip_entity_id = wo.wip_entity_id
5755: AND wor.organization_id = wo.organization_id
5756: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5757: AND wor.operation_seq_num = wo.operation_seq_num

Line 5758: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,

5754: AND wor.wip_entity_id = wo.wip_entity_id
5755: AND wor.organization_id = wo.organization_id
5756: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5757: AND wor.operation_seq_num = wo.operation_seq_num
5758: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5759: WIP_CONSTANTS.PO_MOVE)
5760: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;
5761:
5762:

Line 5759: WIP_CONSTANTS.PO_MOVE)

5755: AND wor.organization_id = wo.organization_id
5756: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5757: AND wor.operation_seq_num = wo.operation_seq_num
5758: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5759: WIP_CONSTANTS.PO_MOVE)
5760: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;
5761:
5762:
5763: l_params wip_logger.param_tbl_t;

Line 5760: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;

5756: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5757: AND wor.operation_seq_num = wo.operation_seq_num
5758: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5759: WIP_CONSTANTS.PO_MOVE)
5760: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;
5761:
5762:
5763: l_params wip_logger.param_tbl_t;
5764: l_returnStatus VARCHAR(1);

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

5771: BEGIN
5772: l_move := p_gib.move_profile;
5773:
5774: -- write parameter value to log file
5775: IF (l_logLevel <= wip_constants.trace_logging) THEN
5776: l_params(1).paramName := 'p_group_id';
5777: l_params(1).paramValue := p_gib.group_id;
5778: l_params(2).paramName := 'p_txn_date';
5779: l_params(2).paramValue := p_gib.txn_date;

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

5815:
5816: /*------------------------------------------------------------+
5817: | Insert into PO_REQUISITIONS_INTERFACE_ALL table for per item for jobs
5818: +------------------------------------------------------------*/
5819: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
5820: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
5821:
5822: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
5823: -- po_requisitions_interface as part of MOAC change.

Line 5820: l_move.poReqItem = WIP_CONSTANTS.YES) THEN

5816: /*------------------------------------------------------------+
5817: | Insert into PO_REQUISITIONS_INTERFACE_ALL table for per item for jobs
5818: +------------------------------------------------------------*/
5819: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
5820: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
5821:
5822: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
5823: -- po_requisitions_interface as part of MOAC change.
5824: INSERT INTO po_requisitions_interface_all

Line 5895: WIP_CONSTANTS.INV_MAX_PRECISION),

5891: ))), /* Fixed Bug# 1623063 */
5892: msi.primary_uom_code, -- uom_code
5893: DECODE(msi.outside_operation_uom_type, -- quantity
5894: 'RESOURCE',ROUND(wor.usage_rate_or_amount*wmti.primary_quantity,
5895: WIP_CONSTANTS.INV_MAX_PRECISION),
5896: 'ASSEMBLY',wmti.primary_quantity),
5897: 3, -- line_type_id
5898: wdj.outside_processing_account, -- charge_account_id
5899: bd.location_id, -- deliver_to_location_id

Line 5909: WIP_CONSTANTS.LOTBASED, bcd1.calendar_date, */

5905: wor.resource_id,
5906: wor.repetitive_schedule_id,
5907: /* Bug 4398047 commented following portion of the sql
5908: DECODE(wmti.entity_type, -- Fix for 2374334
5909: WIP_CONSTANTS.LOTBASED, bcd1.calendar_date, */
5910: (bcd3.calendar_date +
5911: (DECODE(wo1.next_operation_seq_num,
5912: NULL, wo1.last_unit_completion_date,
5913: wo2.first_unit_start_date) -

Line 5941: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5937: wip_operations wo1,
5938: wip_operations wo2
5939: WHERE wmti.group_id = p_gib.group_id
5940: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5941: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5942: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5943: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5944: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5945: AND (wmti.overcompletion_transaction_id IS NULL

Line 5942: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5938: wip_operations wo2
5939: WHERE wmti.group_id = p_gib.group_id
5940: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5941: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5942: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5943: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5944: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5945: AND (wmti.overcompletion_transaction_id IS NULL
5946: OR ( wmti.overcompletion_transaction_id IS NOT NULL

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

5939: WHERE wmti.group_id = p_gib.group_id
5940: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5941: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5942: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5943: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5944: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5945: AND (wmti.overcompletion_transaction_id IS NULL
5946: OR ( wmti.overcompletion_transaction_id IS NOT NULL
5947: AND wmti.overcompletion_transaction_qty IS NOT NULL))

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

5940: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5941: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5942: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5943: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5944: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5945: AND (wmti.overcompletion_transaction_id IS NULL
5946: OR ( wmti.overcompletion_transaction_id IS NOT NULL
5947: AND wmti.overcompletion_transaction_qty IS NOT NULL))
5948: --Bugfix 6679124: Join to wor using wdj rather than wmti to get better execution plan.

Line 5955: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

5951: AND wdj.organization_id = wor.organization_id --6679124
5952: AND wdj.wip_entity_id = wor.wip_entity_id -- 6679124
5953: AND wmti.to_operation_seq_num = wor.operation_seq_num
5954: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
5955: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
5956: AND wo1.organization_id = wmti.organization_id
5957: AND wo1.wip_entity_id = wmti.wip_entity_id
5958: AND wo1.operation_seq_num = wmti.to_operation_seq_num
5959: AND wo2.organization_id = wo1.organization_id

Line 5962: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

5958: AND wo1.operation_seq_num = wmti.to_operation_seq_num
5959: AND wo2.organization_id = wo1.organization_id
5960: AND wo2.wip_entity_id = wo1.wip_entity_id
5961: -- Fixed bug 2259661
5962: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
5963: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
5964: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
5965: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
5966: WIP_CONSTANTS.PO_MOVE))

Line 5964: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

5960: AND wo2.wip_entity_id = wo1.wip_entity_id
5961: -- Fixed bug 2259661
5962: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
5963: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
5964: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
5965: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
5966: WIP_CONSTANTS.PO_MOVE))
5967: AND ((wo1.next_operation_seq_num IS NOT NULL
5968: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 5965: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

5961: -- Fixed bug 2259661
5962: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
5963: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
5964: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
5965: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
5966: WIP_CONSTANTS.PO_MOVE))
5967: AND ((wo1.next_operation_seq_num IS NOT NULL
5968: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
5969: OR (wo1.next_operation_seq_num IS NULL

Line 5966: WIP_CONSTANTS.PO_MOVE))

5962: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
5963: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
5964: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
5965: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
5966: WIP_CONSTANTS.PO_MOVE))
5967: AND ((wo1.next_operation_seq_num IS NOT NULL
5968: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
5969: OR (wo1.next_operation_seq_num IS NULL
5970: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 5973: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION

5969: OR (wo1.next_operation_seq_num IS NULL
5970: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
5971: AND wdj.organization_id = wmti.organization_id
5972: AND wdj.wip_entity_id = wmti.wip_entity_id
5973: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
5974: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
5975: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
5976: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5977: AND wor.organization_id = br.organization_id

Line 5974: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

5970: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
5971: AND wdj.organization_id = wmti.organization_id
5972: AND wdj.wip_entity_id = wmti.wip_entity_id
5973: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
5974: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
5975: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
5976: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5977: AND wor.organization_id = br.organization_id
5978: AND wor.resource_id = br.resource_id

Line 5975: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

5971: AND wdj.organization_id = wmti.organization_id
5972: AND wdj.wip_entity_id = wmti.wip_entity_id
5973: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
5974: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
5975: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
5976: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5977: AND wor.organization_id = br.organization_id
5978: AND wor.resource_id = br.resource_id
5979: AND br.organization_id = msi.organization_id

Line 5976: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

5972: AND wdj.wip_entity_id = wmti.wip_entity_id
5973: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
5974: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
5975: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
5976: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5977: AND wor.organization_id = br.organization_id
5978: AND wor.resource_id = br.resource_id
5979: AND br.organization_id = msi.organization_id
5980: AND br.purchase_item_id = msi.inventory_item_id

Line 5985: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

5981: AND wmti.created_by = fu.user_id
5982: AND wmti.organization_id = bd.organization_id
5983: /* Fix for bug 3609023: Corrected condition to ensure we insert
5984: correct deliver_to_location_id for PO_RECEIPT */
5985: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
5986: wo1.department_id = bd.department_id)
5987: OR
5988: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
5989: wo2.department_id = bd.department_id))

Line 5988: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

5984: correct deliver_to_location_id for PO_RECEIPT */
5985: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
5986: wo1.department_id = bd.department_id)
5987: OR
5988: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
5989: wo2.department_id = bd.department_id))
5990: AND mp.organization_id = wmti.organization_id
5991: AND hoi.organization_id = wmti.organization_id
5992: AND hoi.org_information_context = 'Accounting Information'

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

6019: AND bcd3.exception_set_id = mp.calendar_exception_set_id
6020: AND bcd3.seq_num = (bcd4.next_seq_num -
6021: CEIL(NVL(msi.postprocessing_lead_time,0)));
6022: -- IF debug message level = 2, write statement below to log file
6023: IF (l_logLevel <= wip_constants.full_logging) THEN
6024: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6025: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6026: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6027: l_msg := fnd_message.get;

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

6033:
6034: /*------------------------------------------------------------+
6035: |Insert into po_req interface table for per item for schedule
6036: +------------------------------------------------------------*/
6037: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6038: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
6039: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6040: -- po_requisitions_interface as part of MOAC change.
6041: INSERT INTO po_requisitions_interface_all

Line 6038: l_move.poReqItem = WIP_CONSTANTS.YES) THEN

6034: /*------------------------------------------------------------+
6035: |Insert into po_req interface table for per item for schedule
6036: +------------------------------------------------------------*/
6037: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6038: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
6039: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6040: -- po_requisitions_interface as part of MOAC change.
6041: INSERT INTO po_requisitions_interface_all
6042: (last_update_date,

Line 6108: WIP_CONSTANTS.INV_MAX_PRECISION),

6104: ))), /* Fixed Bug# 1623063 */
6105: msi.primary_uom_code, -- uom_code
6106: DECODE(msi.outside_operation_uom_type, -- quantity
6107: 'RESOURCE',ROUND(wor.usage_rate_or_amount *wma.primary_quantity,
6108: WIP_CONSTANTS.INV_MAX_PRECISION),
6109: 'ASSEMBLY',wma.primary_quantity),
6110: 3, -- line_type_id
6111: wrs.outside_processing_account,-- charge_account_id
6112: bd.location_id, -- deliver_to_location_id

Line 6148: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6144: wip_move_txn_allocations wma,
6145: wip_move_txn_interface wmti
6146: WHERE wmti.group_id = p_gib.group_id
6147: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6148: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6149: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6150: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6151: AND (wmti.overcompletion_transaction_id IS NULL
6152: OR ( wmti.overcompletion_transaction_id IS NOT NULL

Line 6149: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6145: wip_move_txn_interface wmti
6146: WHERE wmti.group_id = p_gib.group_id
6147: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6148: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6149: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6150: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6151: AND (wmti.overcompletion_transaction_id IS NULL
6152: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6153: AND wmti.overcompletion_transaction_qty IS NOT NULL))

Line 6150: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

6146: WHERE wmti.group_id = p_gib.group_id
6147: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6148: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6149: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6150: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6151: AND (wmti.overcompletion_transaction_id IS NULL
6152: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6153: AND wmti.overcompletion_transaction_qty IS NOT NULL))
6154: AND wmti.organization_id = wor.organization_id

Line 6161: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6157: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
6158: AND wmti.organization_id = wma.organization_id
6159: AND wmti.transaction_id = wma.transaction_id
6160: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6161: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6162: AND wrs.organization_id = wor.organization_id
6163: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6164: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6165: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

Line 6164: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION

6160: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6161: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6162: AND wrs.organization_id = wor.organization_id
6163: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6164: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6165: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6166: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6167: AND wo1.organization_id = wmti.organization_id
6168: AND wo1.wip_entity_id = wmti.wip_entity_id

Line 6165: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

6161: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6162: AND wrs.organization_id = wor.organization_id
6163: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6164: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6165: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6166: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6167: AND wo1.organization_id = wmti.organization_id
6168: AND wo1.wip_entity_id = wmti.wip_entity_id
6169: AND wo1.operation_seq_num = wmti.to_operation_seq_num

Line 6166: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

6162: AND wrs.organization_id = wor.organization_id
6163: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6164: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6165: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6166: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6167: AND wo1.organization_id = wmti.organization_id
6168: AND wo1.wip_entity_id = wmti.wip_entity_id
6169: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6170: AND wo1.repetitive_schedule_id = wor.repetitive_schedule_id

Line 6175: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

6171: AND wo2.organization_id = wo1.organization_id
6172: AND wo2.wip_entity_id = wo1.wip_entity_id
6173: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6174: -- Fixed bug 2259661
6175: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6176: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6177: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6178: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6179: WIP_CONSTANTS.PO_MOVE))

Line 6177: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

6173: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6174: -- Fixed bug 2259661
6175: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6176: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6177: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6178: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6179: WIP_CONSTANTS.PO_MOVE))
6180: AND ((wo1.next_operation_seq_num IS NOT NULL
6181: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 6178: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

6174: -- Fixed bug 2259661
6175: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6176: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6177: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6178: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6179: WIP_CONSTANTS.PO_MOVE))
6180: AND ((wo1.next_operation_seq_num IS NOT NULL
6181: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6182: OR (wo1.next_operation_seq_num IS NULL

Line 6179: WIP_CONSTANTS.PO_MOVE))

6175: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6176: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6177: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6178: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6179: WIP_CONSTANTS.PO_MOVE))
6180: AND ((wo1.next_operation_seq_num IS NOT NULL
6181: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6182: OR (wo1.next_operation_seq_num IS NULL
6183: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 6184: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

6180: AND ((wo1.next_operation_seq_num IS NOT NULL
6181: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6182: OR (wo1.next_operation_seq_num IS NULL
6183: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6184: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
6185: AND wor.organization_id = br.organization_id
6186: AND wor.resource_id = br.resource_id
6187: AND br.organization_id = msi.organization_id
6188: AND br.purchase_item_id = msi.inventory_item_id

Line 6193: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

6189: AND wmti.created_by = fu.user_id
6190: AND wmti.organization_id = bd.organization_id
6191: /* Fix for bug 3609023: Corrected condition to ensure we insert
6192: correct deliver_to_location_id for PO_RECEIPT */
6193: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6194: wo1.department_id = bd.department_id)
6195: OR
6196: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6197: wo2.department_id = bd.department_id))

Line 6196: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

6192: correct deliver_to_location_id for PO_RECEIPT */
6193: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6194: wo1.department_id = bd.department_id)
6195: OR
6196: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6197: wo2.department_id = bd.department_id))
6198: AND mp.organization_id = wmti.organization_id
6199: AND hoi.organization_id = wmti.organization_id
6200: AND hoi.org_information_context = 'Accounting Information'

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

6212: AND bcd1.seq_num = (bcd2.next_seq_num -
6213: CEIL(NVL(msi.postprocessing_lead_time,0)));
6214:
6215: -- IF debug message level = 2, write statement below to log file
6216: IF (l_logLevel <= wip_constants.full_logging) THEN
6217: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6218: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6219: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6220: l_msg := fnd_message.get;

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

6226:
6227: /*------------------------------------------------------------+
6228: | Insert into po_req interface table for per lot for job
6229: +------------------------------------------------------------*/
6230: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
6231: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6232: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6233: -- po_requisitions_interface as part of MOAC change.
6234: INSERT INTO po_requisitions_interface_all

Line 6231: l_move.poReqLot = WIP_CONSTANTS.YES) THEN

6227: /*------------------------------------------------------------+
6228: | Insert into po_req interface table for per lot for job
6229: +------------------------------------------------------------*/
6230: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
6231: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6232: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6233: -- po_requisitions_interface as part of MOAC change.
6234: INSERT INTO po_requisitions_interface_all
6235: (last_update_date,

Line 6305: WIP_CONSTANTS.INV_MAX_PRECISION)),

6301: )))), /* Fixed Bug# 1623063 */
6302: MAX(msi.primary_uom_code), -- uom_code
6303: DECODE(MAX(msi.outside_operation_uom_type), -- quantity
6304: 'RESOURCE',MAX(ROUND(wor.usage_rate_or_amount,
6305: WIP_CONSTANTS.INV_MAX_PRECISION)),
6306: 'ASSEMBLY', 1),
6307: 3, -- line_type_id
6308: MAX(wdj.outside_processing_account), -- charge_account_id
6309: MAX(bd.location_id), -- deliver_to_location_id

Line 6319: WIP_CONSTANTS.LOTBASED, MAX(bcd1.calendar_date),*/

6315: MAX(wor.resource_id),
6316: wor.repetitive_schedule_id,
6317: /* Bug 4398047 commenting out this portion of the sql
6318: DECODE(MAX(wmti.entity_type), -- Fix for 2374334
6319: WIP_CONSTANTS.LOTBASED, MAX(bcd1.calendar_date),*/
6320: (MAX(bcd3.calendar_date) +
6321: (DECODE(MAX(wo1.next_operation_seq_num),
6322: NULL, MAX(wo1.last_unit_completion_date),
6323: MAX(wo2.first_unit_start_date)) -

Line 6351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6347: wip_operations wo1,
6348: wip_operations wo2
6349: WHERE wmti.group_id = p_gib.group_id
6350: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6353: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6354: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6355: AND (wmti.overcompletion_transaction_id IS NULL

Line 6352: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6348: wip_operations wo2
6349: WHERE wmti.group_id = p_gib.group_id
6350: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6353: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6354: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6355: AND (wmti.overcompletion_transaction_id IS NULL
6356: OR ( wmti.overcompletion_transaction_id IS NOT NULL

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

6349: WHERE wmti.group_id = p_gib.group_id
6350: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6353: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6354: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6355: AND (wmti.overcompletion_transaction_id IS NULL
6356: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6357: AND wmti.overcompletion_transaction_qty IS NOT NULL))

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

6350: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6353: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6354: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6355: AND (wmti.overcompletion_transaction_id IS NULL
6356: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6357: AND wmti.overcompletion_transaction_qty IS NOT NULL))
6358: -- Bugfix 6679124: Join to wor using wdj rather than wmti to get better execution plan

Line 6365: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6361: AND wdj.organization_id = wor.organization_id --6679124
6362: AND wdj.wip_entity_id = wor.wip_entity_id -- 6679124
6363: AND wmti.to_operation_seq_num = wor.operation_seq_num
6364: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6365: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6366: AND wo1.organization_id = wmti.organization_id
6367: AND wo1.wip_entity_id = wmti.wip_entity_id
6368: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6369: AND wo2.organization_id = wo1.organization_id

Line 6372: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

6368: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6369: AND wo2.organization_id = wo1.organization_id
6370: AND wo2.wip_entity_id = wo1.wip_entity_id
6371: -- Fixed bug 2259661
6372: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6373: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6374: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6375: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6376: WIP_CONSTANTS.PO_MOVE))

Line 6374: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

6370: AND wo2.wip_entity_id = wo1.wip_entity_id
6371: -- Fixed bug 2259661
6372: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6373: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6374: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6375: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6376: WIP_CONSTANTS.PO_MOVE))
6377: AND ((wo1.next_operation_seq_num IS NOT NULL
6378: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 6375: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

6371: -- Fixed bug 2259661
6372: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6373: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6374: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6375: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6376: WIP_CONSTANTS.PO_MOVE))
6377: AND ((wo1.next_operation_seq_num IS NOT NULL
6378: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6379: OR (wo1.next_operation_seq_num IS NULL

Line 6376: WIP_CONSTANTS.PO_MOVE))

6372: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6373: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6374: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6375: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6376: WIP_CONSTANTS.PO_MOVE))
6377: AND ((wo1.next_operation_seq_num IS NOT NULL
6378: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6379: OR (wo1.next_operation_seq_num IS NULL
6380: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 6383: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION

6379: OR (wo1.next_operation_seq_num IS NULL
6380: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6381: AND wdj.organization_id = wmti.organization_id
6382: AND wdj.wip_entity_id = wmti.wip_entity_id
6383: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6384: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6385: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6386: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6387: AND wor.organization_id = br.organization_id

Line 6384: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

6380: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6381: AND wdj.organization_id = wmti.organization_id
6382: AND wdj.wip_entity_id = wmti.wip_entity_id
6383: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6384: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6385: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6386: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6387: AND wor.organization_id = br.organization_id
6388: AND wor.resource_id = br.resource_id

Line 6385: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

6381: AND wdj.organization_id = wmti.organization_id
6382: AND wdj.wip_entity_id = wmti.wip_entity_id
6383: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6384: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6385: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6386: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6387: AND wor.organization_id = br.organization_id
6388: AND wor.resource_id = br.resource_id
6389: AND br.organization_id = msi.organization_id

Line 6386: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

6382: AND wdj.wip_entity_id = wmti.wip_entity_id
6383: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6384: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6385: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6386: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6387: AND wor.organization_id = br.organization_id
6388: AND wor.resource_id = br.resource_id
6389: AND br.organization_id = msi.organization_id
6390: AND br.purchase_item_id = msi.inventory_item_id

Line 6395: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

6391: AND wmti.created_by = fu.user_id
6392: AND wmti.organization_id = bd.organization_id
6393: /* Fix for bug 3609023: Corrected condition to ensure we insert
6394: correct deliver_to_location_id for PO_RECEIPT */
6395: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6396: wo1.department_id = bd.department_id)
6397: OR
6398: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6399: wo2.department_id = bd.department_id))

Line 6398: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

6394: correct deliver_to_location_id for PO_RECEIPT */
6395: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6396: wo1.department_id = bd.department_id)
6397: OR
6398: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6399: wo2.department_id = bd.department_id))
6400: AND mp.organization_id = wmti.organization_id
6401: AND hoi.organization_id = wmti.organization_id
6402: AND hoi.org_information_context = 'Accounting Information'

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

6447: 1, 0),
6448: 1, 0);
6449:
6450: -- IF debug message level = 2, write statement below to log file
6451: IF (l_logLevel <= wip_constants.full_logging) THEN
6452: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6453: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6454: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6455: l_msg := fnd_message.get;

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

6461:
6462: /*------------------------------------------------------------+
6463: | Insert into po_req interface table for per lot for schedule
6464: +------------------------------------------------------------*/
6465: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6466: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6467: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6468: -- po_requisitions_interface as part of MOAC change.
6469: INSERT INTO po_requisitions_interface_all

Line 6466: l_move.poReqLot = WIP_CONSTANTS.YES) THEN

6462: /*------------------------------------------------------------+
6463: | Insert into po_req interface table for per lot for schedule
6464: +------------------------------------------------------------*/
6465: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6466: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6467: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6468: -- po_requisitions_interface as part of MOAC change.
6469: INSERT INTO po_requisitions_interface_all
6470: (last_update_date,

Line 6536: WIP_CONSTANTS.INV_MAX_PRECISION)),

6532: )))), /* Fixed Bug# 1623063 */
6533: MAX(msi.primary_uom_code), -- uom_code
6534: DECODE(MAX(msi.outside_operation_uom_type), -- quantity
6535: 'RESOURCE',MAX(ROUND(wor.usage_rate_or_amount,
6536: WIP_CONSTANTS.INV_MAX_PRECISION)),
6537: 'ASSEMBLY', 1),
6538: 3, -- line_type_id
6539: MAX(wrs.outside_processing_account), -- charge_account_id
6540: MAX(bd.location_id), -- deliver_to_location_id

Line 6576: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6572: wip_move_txn_allocations wma,
6573: wip_move_txn_interface wmti
6574: WHERE wmti.group_id = p_gib.group_id
6575: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6576: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6577: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6578: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6579: AND (wmti.overcompletion_transaction_id IS NULL
6580: OR ( wmti.overcompletion_transaction_id IS NOT NULL

Line 6577: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6573: wip_move_txn_interface wmti
6574: WHERE wmti.group_id = p_gib.group_id
6575: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6576: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6577: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6578: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6579: AND (wmti.overcompletion_transaction_id IS NULL
6580: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6581: AND wmti.overcompletion_transaction_qty IS NOT NULL))

Line 6578: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

6574: WHERE wmti.group_id = p_gib.group_id
6575: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6576: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6577: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6578: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6579: AND (wmti.overcompletion_transaction_id IS NULL
6580: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6581: AND wmti.overcompletion_transaction_qty IS NOT NULL))
6582: AND wmti.organization_id = wor.organization_id

Line 6589: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6585: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
6586: AND wmti.organization_id = wma.organization_id
6587: AND wmti.transaction_id = wma.transaction_id
6588: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6589: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6590: AND wrs.organization_id = wor.organization_id
6591: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6592: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6593: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

Line 6592: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION

6588: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6589: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6590: AND wrs.organization_id = wor.organization_id
6591: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6592: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6593: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6594: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6595: AND wo1.organization_id = wmti.organization_id
6596: AND wo1.wip_entity_id = wmti.wip_entity_id

Line 6593: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

6589: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6590: AND wrs.organization_id = wor.organization_id
6591: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6592: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6593: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6594: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6595: AND wo1.organization_id = wmti.organization_id
6596: AND wo1.wip_entity_id = wmti.wip_entity_id
6597: AND wo1.repetitive_schedule_id = wor.repetitive_schedule_id

Line 6594: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

6590: AND wrs.organization_id = wor.organization_id
6591: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6592: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6593: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6594: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6595: AND wo1.organization_id = wmti.organization_id
6596: AND wo1.wip_entity_id = wmti.wip_entity_id
6597: AND wo1.repetitive_schedule_id = wor.repetitive_schedule_id
6598: AND wo1.operation_seq_num = wmti.to_operation_seq_num

Line 6603: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

6599: AND wo2.organization_id = wo1.organization_id
6600: AND wo2.wip_entity_id = wo1.wip_entity_id
6601: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6602: -- Fixed bug 2259661
6603: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6604: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6605: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6606: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6607: WIP_CONSTANTS.PO_MOVE))

Line 6605: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

6601: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6602: -- Fixed bug 2259661
6603: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6604: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6605: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6606: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6607: WIP_CONSTANTS.PO_MOVE))
6608: AND ((wo1.next_operation_seq_num IS NOT NULL
6609: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 6606: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

6602: -- Fixed bug 2259661
6603: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6604: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6605: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6606: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6607: WIP_CONSTANTS.PO_MOVE))
6608: AND ((wo1.next_operation_seq_num IS NOT NULL
6609: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6610: OR (wo1.next_operation_seq_num IS NULL

Line 6607: WIP_CONSTANTS.PO_MOVE))

6603: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6604: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6605: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6606: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6607: WIP_CONSTANTS.PO_MOVE))
6608: AND ((wo1.next_operation_seq_num IS NOT NULL
6609: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6610: OR (wo1.next_operation_seq_num IS NULL
6611: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 6612: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

6608: AND ((wo1.next_operation_seq_num IS NOT NULL
6609: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6610: OR (wo1.next_operation_seq_num IS NULL
6611: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6612: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6613: AND wor.organization_id = br.organization_id
6614: AND wor.resource_id = br.resource_id
6615: AND br.organization_id = msi.organization_id
6616: AND br.purchase_item_id = msi.inventory_item_id

Line 6621: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

6617: AND wmti.created_by = fu.user_id
6618: AND wmti.organization_id = bd.organization_id
6619: /* Fix for bug 3609023: Corrected condition to ensure we insert
6620: correct deliver_to_location_id for PO_RECEIPT */
6621: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6622: wo1.department_id = bd.department_id)
6623: OR
6624: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6625: wo2.department_id = bd.department_id))

Line 6624: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

6620: correct deliver_to_location_id for PO_RECEIPT */
6621: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6622: wo1.department_id = bd.department_id)
6623: OR
6624: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6625: wo2.department_id = bd.department_id))
6626: AND mp.organization_id = wmti.organization_id
6627: AND hoi.organization_id = wmti.organization_id
6628: AND hoi.org_information_context = 'Accounting Information'

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

6668: 1, 0),
6669: 1, 0);
6670:
6671: -- IF debug message level = 2, write statement below to log file
6672: IF (l_logLevel <= wip_constants.full_logging) THEN
6673: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6674: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6675: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6676: l_msg := fnd_message.get;

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

6703: END IF; -- check PO patchset
6704: x_returnStatus := fnd_api.g_ret_sts_success;
6705:
6706: -- write to the log file
6707: IF (l_logLevel <= wip_constants.trace_logging) THEN
6708: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_po_req',
6709: p_procReturnStatus => x_returnStatus,
6710: p_msg => 'procedure complete',
6711: x_returnStatus => l_returnStatus);

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

6718: END IF;
6719: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
6720: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
6721:
6722: IF (l_logLevel <= wip_constants.trace_logging) THEN
6723: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_po_req',
6724: p_procReturnStatus => x_returnStatus,
6725: p_msg => l_errMsg,
6726: x_returnStatus => l_returnStatus);

Line 6756: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6752: wip_operation_resources wor,
6753: wip_operations wo,
6754: wip_move_txn_interface wmti
6755: WHERE wmti.group_id = p_group_id
6756: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6757: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6758: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
6759: AND (wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6760: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num

Line 6757: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6753: wip_operations wo,
6754: wip_move_txn_interface wmti
6755: WHERE wmti.group_id = p_group_id
6756: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6757: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6758: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
6759: AND (wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6760: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
6761: AND wmti.fm_intraoperation_step_type <

Line 6763: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6759: AND (wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6760: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
6761: AND wmti.fm_intraoperation_step_type <
6762: wmti.to_intraoperation_step_type))
6763: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6764: AND muom.uom_code = wmti.primary_uom
6765: AND wo.wip_entity_id = wmti.wip_entity_id
6766: AND wo.organization_id = wmti.organization_id
6767: AND NVL(wo.repetitive_schedule_id, -1) =

Line 6789: AND wor.autocharge_type in(WIP_CONSTANTS.PO_MOVE, --Fix for 2393550

6785: AND wor.organization_id = wo.organization_id
6786: AND NVL(wor.repetitive_schedule_id, -1) =
6787: NVL(wo.repetitive_schedule_id, -1)
6788: AND wor.operation_seq_num = wo.operation_seq_num
6789: AND wor.autocharge_type in(WIP_CONSTANTS.PO_MOVE, --Fix for 2393550
6790: WIP_CONSTANTS.PO_RECEIPT)
6791: AND br.resource_id = wor.resource_id
6792: AND br.organization_id = wor.organization_id
6793: AND br.purchase_item_id IS NOT NULL;

Line 6790: WIP_CONSTANTS.PO_RECEIPT)

6786: AND NVL(wor.repetitive_schedule_id, -1) =
6787: NVL(wo.repetitive_schedule_id, -1)
6788: AND wor.operation_seq_num = wo.operation_seq_num
6789: AND wor.autocharge_type in(WIP_CONSTANTS.PO_MOVE, --Fix for 2393550
6790: WIP_CONSTANTS.PO_RECEIPT)
6791: AND br.resource_id = wor.resource_id
6792: AND br.organization_id = wor.organization_id
6793: AND br.purchase_item_id IS NOT NULL;
6794:

Line 6808: l_osp_exist NUMBER := WIP_CONSTANTS.NO;

6804: l_org_acct_ctxt VARCHAR2(30):= 'Accounting Information';
6805:
6806: -- new parameter used to determine whether we have to launch "Req Import"
6807: -- concurrent program or not
6808: l_osp_exist NUMBER := WIP_CONSTANTS.NO;
6809: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;
6810: BEGIN
6811: -- write parameter value to log file
6812: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 6809: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;

6805:
6806: -- new parameter used to determine whether we have to launch "Req Import"
6807: -- concurrent program or not
6808: l_osp_exist NUMBER := WIP_CONSTANTS.NO;
6809: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;
6810: BEGIN
6811: -- write parameter value to log file
6812: IF (l_logLevel <= wip_constants.trace_logging) THEN
6813: l_params(1).paramName := 'p_group_id';

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

6808: l_osp_exist NUMBER := WIP_CONSTANTS.NO;
6809: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;
6810: BEGIN
6811: -- write parameter value to log file
6812: IF (l_logLevel <= wip_constants.trace_logging) THEN
6813: l_params(1).paramName := 'p_group_id';
6814: l_params(1).paramValue := p_gib.group_id;
6815: l_params(2).paramName := 'p_txn_date';
6816: l_params(2).paramValue := p_gib.txn_date;

Line 6827: l_osp_exist := WIP_CONSTANTS.YES;

6823: LOOP
6824: FETCH c_wmti_txn INTO l_wmti_txn;
6825: EXIT WHEN c_wmti_txn%NOTFOUND;
6826:
6827: l_osp_exist := WIP_CONSTANTS.YES;
6828: l_org_id := l_wmti_txn.org_id;
6829:
6830: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_MOVE) THEN
6831: -- Launch workflow only for PO_MOVE

Line 6830: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_MOVE) THEN

6826:
6827: l_osp_exist := WIP_CONSTANTS.YES;
6828: l_org_id := l_wmti_txn.org_id;
6829:
6830: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_MOVE) THEN
6831: -- Launch workflow only for PO_MOVE
6832: -- call PL/SQL API to start workflow
6833:
6834: -- Fixed bug 5333089. Need to set org context before launching workflow

Line 6863: l_launch_req_import := WIP_CONSTANTS.NO;

6859: WHERE transaction_id = l_wmti_txn.txn_id;
6860: END IF;
6861: -- No need to lauch "Req Import" again if we already laucned the workflow
6862: -- because "Req Import" is part of the workflow itself.
6863: l_launch_req_import := WIP_CONSTANTS.NO;
6864: -- Fix for Bug#4369684. Need to reassign to null for multiple OSP Move.
6865: l_itemkey := NULL;
6866: END IF; -- PO_MOVE
6867: END LOOP;

Line 6871: IF(l_osp_exist = WIP_CONSTANTS.YES AND

6867: END LOOP;
6868:
6869: -- If OSP item exists, and there is no workflow launch yet, we have to launch
6870: -- "Req Import" concurrent program
6871: IF(l_osp_exist = WIP_CONSTANTS.YES AND
6872: l_launch_req_import = WIP_CONSTANTS.YES) THEN
6873:
6874: -- get the OU, set context for MOAC
6875: select to_number(ORG_INFORMATION3) into l_ou_id

Line 6872: l_launch_req_import = WIP_CONSTANTS.YES) THEN

6868:
6869: -- If OSP item exists, and there is no workflow launch yet, we have to launch
6870: -- "Req Import" concurrent program
6871: IF(l_osp_exist = WIP_CONSTANTS.YES AND
6872: l_launch_req_import = WIP_CONSTANTS.YES) THEN
6873:
6874: -- get the OU, set context for MOAC
6875: select to_number(ORG_INFORMATION3) into l_ou_id
6876: from HR_ORGANIZATION_INFORMATION

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

6898: CLOSE c_wmti_txn;
6899: END IF;
6900: x_returnStatus := fnd_api.g_ret_sts_success;
6901: -- write to the log file
6902: IF (l_logLevel <= wip_constants.trace_logging) THEN
6903: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.start_workflow',
6904: p_procReturnStatus => x_returnStatus,
6905: p_msg => 'procedure complete',
6906: x_returnStatus => l_returnStatus);

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

6914: END IF;
6915: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
6916: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
6917:
6918: IF (l_logLevel <= wip_constants.trace_logging) THEN
6919: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.start_workflow',
6920: p_procReturnStatus => x_returnStatus,
6921: p_msg => l_errMsg,
6922: x_returnStatus => l_returnStatus);

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

6942: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
6943:
6944: BEGIN
6945: -- write parameter value to log file
6946: IF (l_logLevel <= wip_constants.trace_logging) THEN
6947: l_params(1).paramName := 'p_group_id';
6948: l_params(1).paramValue := p_gib.group_id;
6949: l_params(2).paramName := 'p_txn_date';
6950: l_params(2).paramValue := p_gib.txn_date;

Line 6977: WIP_CONSTANTS.RUN),

6973: NVL(SUM(NVL(wma1.primary_quantity, wmti.primary_quantity) *
6974: DECODE(SIGN(wmti.to_operation_seq_num -
6975: wmti.fm_operation_seq_num),
6976: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
6977: WIP_CONSTANTS.RUN),
6978: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
6979: WIP_CONSTANTS.RUN),1,1,-1),
6980: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
6981: WIP_CONSTANTS.RUN),1,1,-1),

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

6975: wmti.fm_operation_seq_num),
6976: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
6977: WIP_CONSTANTS.RUN),
6978: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
6979: WIP_CONSTANTS.RUN),1,1,-1),
6980: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
6981: WIP_CONSTANTS.RUN),1,1,-1),
6982: 1,-1),
6983: 1, 1,

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

6977: WIP_CONSTANTS.RUN),
6978: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
6979: WIP_CONSTANTS.RUN),1,1,-1),
6980: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
6981: WIP_CONSTANTS.RUN),1,1,-1),
6982: 1,-1),
6983: 1, 1,
6984: -1,-1)
6985: ),0)), /* for discrete */

Line 6991: WIP_CONSTANTS.RUN),

6987: NVL(SUM(NVL(wma1.primary_quantity, wmti.primary_quantity) *
6988: DECODE(SIGN(wmti.to_operation_seq_num -
6989: wmti.fm_operation_seq_num),
6990: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
6991: WIP_CONSTANTS.RUN),
6992: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
6993: WIP_CONSTANTS.RUN),1,1,-1),
6994: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
6995: WIP_CONSTANTS.RUN),1,1,-1),

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

6989: wmti.fm_operation_seq_num),
6990: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
6991: WIP_CONSTANTS.RUN),
6992: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
6993: WIP_CONSTANTS.RUN),1,1,-1),
6994: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
6995: WIP_CONSTANTS.RUN),1,1,-1),
6996: 1,-1),
6997: 1, 1,

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

6991: WIP_CONSTANTS.RUN),
6992: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
6993: WIP_CONSTANTS.RUN),1,1,-1),
6994: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
6995: WIP_CONSTANTS.RUN),1,1,-1),
6996: 1,-1),
6997: 1, 1,
6998: -1,-1)
6999: ),0) /* for repetitive */

Line 7015: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7011: WHERE wop1.rowid = wop.rowid
7012: AND wmti.group_id = p_gib.group_id
7013: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7014: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7015: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7016: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7017: AND wop1.organization_id = wmti.organization_id
7018: AND wop1.wip_entity_id = wmti.wip_entity_id
7019: AND wmti.organization_id = wma1.organization_id (+)

Line 7016: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7012: AND wmti.group_id = p_gib.group_id
7013: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7014: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7015: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7016: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7017: AND wop1.organization_id = wmti.organization_id
7018: AND wop1.wip_entity_id = wmti.wip_entity_id
7019: AND wmti.organization_id = wma1.organization_id (+)
7020: AND wmti.transaction_id = wma1.transaction_id (+)

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

7021: AND NVL(wma1.repetitive_schedule_id,0) =
7022: NVL(wop1.repetitive_schedule_id,0)
7023: AND ((wop1.operation_seq_num >= wmti.fm_operation_seq_num
7024: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7025: WIP_CONSTANTS.RUN),1,1,0)
7026: AND wop1.operation_seq_num < wmti.to_operation_seq_num
7027: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7028: WIP_CONSTANTS.RUN),1,1,0)
7029: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

7024: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7025: WIP_CONSTANTS.RUN),1,1,0)
7026: AND wop1.operation_seq_num < wmti.to_operation_seq_num
7027: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7028: WIP_CONSTANTS.RUN),1,1,0)
7029: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7030: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7031: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7032: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

7027: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7028: WIP_CONSTANTS.RUN),1,1,0)
7029: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7030: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7031: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7032: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7033: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7034: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7035: OR (wop1.operation_seq_num = wmti.to_operation_seq_num

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

7028: WIP_CONSTANTS.RUN),1,1,0)
7029: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7030: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7031: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7032: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7033: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7034: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7035: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7036: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))

Line 7033: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL

7029: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7030: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7031: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7032: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7033: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7034: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7035: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7036: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7037: OR

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

7032: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7033: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7034: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7035: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7036: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7037: OR
7038: (wop1.operation_seq_num < wmti.fm_operation_seq_num
7039: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7040: WIP_CONSTANTS.RUN),1,1,0)

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

7036: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7037: OR
7038: (wop1.operation_seq_num < wmti.fm_operation_seq_num
7039: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7040: WIP_CONSTANTS.RUN),1,1,0)
7041: AND wop1.operation_seq_num >= wmti.to_operation_seq_num
7042: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7043: WIP_CONSTANTS.RUN),1,1,0)
7044: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

7039: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7040: WIP_CONSTANTS.RUN),1,1,0)
7041: AND wop1.operation_seq_num >= wmti.to_operation_seq_num
7042: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7043: WIP_CONSTANTS.RUN),1,1,0)
7044: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7045: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7046: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7047: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

7042: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7043: WIP_CONSTANTS.RUN),1,1,0)
7044: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7045: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7046: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7047: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7048: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7049: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7050: /*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )

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

7043: WIP_CONSTANTS.RUN),1,1,0)
7044: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7045: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7046: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7047: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7048: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7049: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7050: /*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )
7051: OR (wop1.operation_seq_num = wmti.fm_operation_seq_num

Line 7048: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL

7044: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7045: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7046: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7047: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7048: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7049: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7050: /*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )
7051: OR (wop1.operation_seq_num = wmti.fm_operation_seq_num
7052: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))

Line 7050: /*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )

7046: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7047: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7048: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7049: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7050: /*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )
7051: OR (wop1.operation_seq_num = wmti.fm_operation_seq_num
7052: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7053: ))
7054: WHERE wop.rowid IN

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

7048: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7049: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7050: /*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )
7051: OR (wop1.operation_seq_num = wmti.fm_operation_seq_num
7052: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7053: ))
7054: WHERE wop.rowid IN
7055: (SELECT wop2.rowid
7056: FROM wip_operations wop2,

Line 7063: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7059: WHERE wop2.organization_id = wmti.organization_id
7060: AND wmti.group_id = p_gib.group_id
7061: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7062: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7063: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7064: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7065: AND wop2.organization_id = wmti.organization_id
7066: AND wop2.wip_entity_id = wmti.wip_entity_id
7067: AND wmti.organization_id = wma2.organization_id (+)

Line 7064: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7060: AND wmti.group_id = p_gib.group_id
7061: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7062: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7063: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7064: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7065: AND wop2.organization_id = wmti.organization_id
7066: AND wop2.wip_entity_id = wmti.wip_entity_id
7067: AND wmti.organization_id = wma2.organization_id (+)
7068: AND wmti.transaction_id = wma2.transaction_id (+)

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

7069: AND NVL(wma2.repetitive_schedule_id,0) =
7070: NVL(wop2.repetitive_schedule_id,0)
7071: AND ((wop2.operation_seq_num >= wmti.fm_operation_seq_num
7072: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7073: WIP_CONSTANTS.RUN),1,1,0)
7074: AND wop2.operation_seq_num < wmti.to_operation_seq_num
7075: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7076: WIP_CONSTANTS.RUN),1,1,0)
7077: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

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

7072: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7073: WIP_CONSTANTS.RUN),1,1,0)
7074: AND wop2.operation_seq_num < wmti.to_operation_seq_num
7075: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7076: WIP_CONSTANTS.RUN),1,1,0)
7077: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7078: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7079: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7080: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

7075: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7076: WIP_CONSTANTS.RUN),1,1,0)
7077: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7078: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7079: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7080: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7081: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7082: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7083: OR (wop2.operation_seq_num = wmti.to_operation_seq_num

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

7076: WIP_CONSTANTS.RUN),1,1,0)
7077: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7078: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7079: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7080: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7081: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7082: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7083: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7084: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))

Line 7081: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL

7077: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7078: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7079: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7080: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7081: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7082: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7083: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7084: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7085: OR

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

7080: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7081: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7082: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7083: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7084: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7085: OR
7086: (wop2.operation_seq_num < wmti.fm_operation_seq_num
7087: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7088: WIP_CONSTANTS.RUN),1,1,0)

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

7084: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7085: OR
7086: (wop2.operation_seq_num < wmti.fm_operation_seq_num
7087: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7088: WIP_CONSTANTS.RUN),1,1,0)
7089: AND wop2.operation_seq_num >= wmti.to_operation_seq_num
7090: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7091: WIP_CONSTANTS.RUN),1,1,0)
7092: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

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

7087: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7088: WIP_CONSTANTS.RUN),1,1,0)
7089: AND wop2.operation_seq_num >= wmti.to_operation_seq_num
7090: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7091: WIP_CONSTANTS.RUN),1,1,0)
7092: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7093: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7094: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7095: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

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

7090: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7091: WIP_CONSTANTS.RUN),1,1,0)
7092: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7093: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7094: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7095: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7096: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7097: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7098: /*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)

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

7091: WIP_CONSTANTS.RUN),1,1,0)
7092: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7093: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7094: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7095: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7096: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7097: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7098: /*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)
7099: OR (wop2.operation_seq_num = wmti.fm_operation_seq_num

Line 7096: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL

7092: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7093: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7094: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7095: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7096: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7097: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7098: /*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)
7099: OR (wop2.operation_seq_num = wmti.fm_operation_seq_num
7100: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))

Line 7098: /*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)

7094: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7095: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7096: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7097: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7098: /*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)
7099: OR (wop2.operation_seq_num = wmti.fm_operation_seq_num
7100: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7101: ));
7102:

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

7096: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7097: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7098: /*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)
7099: OR (wop2.operation_seq_num = wmti.fm_operation_seq_num
7100: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7101: ));
7102:
7103: -- IF debug message level = 2, write statement below to log file
7104: IF (l_logLevel <= wip_constants.full_logging) THEN

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

7100: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7101: ));
7102:
7103: -- IF debug message level = 2, write statement below to log file
7104: IF (l_logLevel <= wip_constants.full_logging) THEN
7105: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
7106: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
7107: fnd_message.set_token('ENTITY2', 'WIP_OPERATIONS');
7108: l_msg := fnd_message.get;

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

7112:
7113: x_returnStatus := fnd_api.g_ret_sts_success;
7114:
7115: -- write to the log file
7116: IF (l_logLevel <= wip_constants.trace_logging) THEN
7117: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_complete_qty',
7118: p_procReturnStatus => x_returnStatus,
7119: p_msg => 'procedure complete',
7120: x_returnStatus => l_returnStatus);

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

7124: WHEN others THEN
7125: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7126: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7127:
7128: IF (l_logLevel <= wip_constants.trace_logging) THEN
7129: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_complete_qty',
7130: p_procReturnStatus => x_returnStatus,
7131: p_msg => l_errMsg,
7132: x_returnStatus => l_returnStatus);

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

7152: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7153:
7154: BEGIN
7155: -- write parameter value to log file
7156: IF (l_logLevel <= wip_constants.trace_logging) THEN
7157: l_params(1).paramName := 'p_mtl_temp_id';
7158: l_params(1).paramValue := p_mtl_temp_id;
7159: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.op_snapshot',
7160: p_params => l_params,

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

7173:
7174: x_returnStatus := fnd_api.g_ret_sts_success;
7175:
7176: -- write to the log file
7177: IF (l_logLevel <= wip_constants.trace_logging) THEN
7178: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.op_snapshot',
7179: p_procReturnStatus => x_returnStatus,
7180: p_msg => 'procedure complete',
7181: x_returnStatus => l_returnStatus);

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

7184: EXCEPTION
7185: WHEN fnd_api.g_exc_unexpected_error THEN
7186: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7187:
7188: IF (l_logLevel <= wip_constants.trace_logging) THEN
7189: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.op_snapshot',
7190: p_procReturnStatus => x_returnStatus,
7191: p_msg => l_errMsg,
7192: x_returnStatus => l_returnStatus);

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

7198: WHEN others THEN
7199: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7200: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7201:
7202: IF (l_logLevel <= wip_constants.trace_logging) THEN
7203: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.op_snapshot',
7204: p_procReturnStatus => x_returnStatus,
7205: p_msg => l_errMsg,
7206: x_returnStatus => l_returnStatus);

Line 7231: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE

7227: WHERE transaction_header_id = p_mtl_header_id
7228: AND transaction_action_id = p_txn_action_id
7229: AND transaction_type_id = p_txn_type_id
7230: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7231: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7232: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM */
7233:
7234: l_params wip_logger.param_tbl_t;
7235: l_returnStatus VARCHAR(1);

Line 7232: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM */

7228: AND transaction_action_id = p_txn_action_id
7229: AND transaction_type_id = p_txn_type_id
7230: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7231: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7232: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM */
7233:
7234: l_params wip_logger.param_tbl_t;
7235: l_returnStatus VARCHAR(1);
7236: l_errMsg VARCHAR(240);

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

7240: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7241:
7242: BEGIN
7243: -- write parameter value to log file
7244: IF (l_logLevel <= wip_constants.trace_logging) THEN
7245: l_params(1).paramName := 'p_mtl_header_id';
7246: l_params(1).paramValue := p_mtl_header_id;
7247: l_params(2).paramName := 'p_org_id';
7248: l_params(2).paramValue := p_org_id;

Line 7272: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR

7268: INTO l_mandatory_scrap_flag
7269: FROM wip_parameters wp
7270: WHERE wp.organization_id = p_org_id;
7271:
7272: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7273: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7274: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7275: AND
7276: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR

Line 7273: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR

7269: FROM wip_parameters wp
7270: WHERE wp.organization_id = p_org_id;
7271:
7272: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7273: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7274: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7275: AND
7276: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7277: p_txn_type = WIP_CONSTANTS.RET_TXN OR

Line 7274: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)

7270: WHERE wp.organization_id = p_org_id;
7271:
7272: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7273: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7274: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7275: AND
7276: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7277: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7278: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN

Line 7276: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR

7272: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7273: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7274: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7275: AND
7276: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7277: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7278: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7279:
7280: -- Fix bug 2369642

Line 7277: p_txn_type = WIP_CONSTANTS.RET_TXN OR

7273: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7274: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7275: AND
7276: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7277: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7278: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7279:
7280: -- Fix bug 2369642
7281: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND

Line 7278: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN

7274: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7275: AND
7276: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7277: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7278: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7279:
7280: -- Fix bug 2369642
7281: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND
7282: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN

Line 7281: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND

7277: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7278: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7279:
7280: -- Fix bug 2369642
7281: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND
7282: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN
7283:
7284: UPDATE mtl_material_transactions_temp
7285: SET transaction_temp_id = mtl_material_transactions_s.nextval

Line 7282: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN

7278: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7279:
7280: -- Fix bug 2369642
7281: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND
7282: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN
7283:
7284: UPDATE mtl_material_transactions_temp
7285: SET transaction_temp_id = mtl_material_transactions_s.nextval
7286: WHERE transaction_header_id = p_mtl_header_id

Line 7291: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE

7287: AND transaction_temp_id IS NULL
7288: AND transaction_action_id = p_txn_action_id
7289: AND transaction_type_id = p_txn_type_id
7290: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7291: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7292: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM*/
7293:
7294: FOR l_mmtt IN c_mmtt LOOP
7295: op_snapshot(p_mtl_temp_id => l_mmtt.mtl_temp_id,

Line 7292: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM*/

7288: AND transaction_action_id = p_txn_action_id
7289: AND transaction_type_id = p_txn_type_id
7290: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7291: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7292: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM*/
7293:
7294: FOR l_mmtt IN c_mmtt LOOP
7295: op_snapshot(p_mtl_temp_id => l_mmtt.mtl_temp_id,
7296: x_returnStatus => x_returnStatus);

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

7304:
7305: x_returnStatus := fnd_api.g_ret_sts_success;
7306:
7307: -- write to the log file
7308: IF (l_logLevel <= wip_constants.trace_logging) THEN
7309: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_online',
7310: p_procReturnStatus => x_returnStatus,
7311: p_msg => 'procedure complete',
7312: x_returnStatus => l_returnStatus);

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

7315: EXCEPTION
7316: WHEN fnd_api.g_exc_unexpected_error THEN
7317: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7318:
7319: IF (l_logLevel <= wip_constants.trace_logging) THEN
7320: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_online',
7321: p_procReturnStatus => x_returnStatus,
7322: p_msg => l_errMsg,
7323: x_returnStatus => l_returnStatus);

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

7326: WHEN others THEN
7327: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7328: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7329:
7330: IF (l_logLevel <= wip_constants.trace_logging) THEN
7331: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.snapshot_online',
7332: p_procReturnStatus => x_returnStatus,
7333: p_msg => l_errMsg,
7334: x_returnStatus => l_returnStatus);

Line 7381: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7377: mtl_parameters mp
7378: WHERE wmti.group_id = p_group_id
7379: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7380: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7381: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7382: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7383: AND mmtt.move_transaction_id = wmti.transaction_id
7384: /* Improve performance */
7385: AND mmtt.organization_id = wmti.organization_id

Line 7382: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7378: WHERE wmti.group_id = p_group_id
7379: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7380: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7381: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7382: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7383: AND mmtt.move_transaction_id = wmti.transaction_id
7384: /* Improve performance */
7385: AND mmtt.organization_id = wmti.organization_id
7386: AND mmtt.transaction_source_id = wmti.wip_entity_id

Line 7389: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

7385: AND mmtt.organization_id = wmti.organization_id
7386: AND mmtt.transaction_source_id = wmti.wip_entity_id
7387: AND mmtt.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7388: /* End Improve performance */
7389: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7390: WIP_CONSTANTS.LOTBASED) /*WSM */
7391: -- Fixed bug2515712 (do not insert component related record)
7392: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7393: WIP_CONSTANTS.RETASSY_ACTION,

Line 7390: WIP_CONSTANTS.LOTBASED) /*WSM */

7386: AND mmtt.transaction_source_id = wmti.wip_entity_id
7387: AND mmtt.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7388: /* End Improve performance */
7389: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7390: WIP_CONSTANTS.LOTBASED) /*WSM */
7391: -- Fixed bug2515712 (do not insert component related record)
7392: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7393: WIP_CONSTANTS.RETASSY_ACTION,
7394: WIP_CONSTANTS.CPLASSY_ACTION)

Line 7392: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,

7388: /* End Improve performance */
7389: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7390: WIP_CONSTANTS.LOTBASED) /*WSM */
7391: -- Fixed bug2515712 (do not insert component related record)
7392: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7393: WIP_CONSTANTS.RETASSY_ACTION,
7394: WIP_CONSTANTS.CPLASSY_ACTION)
7395: AND mp.organization_id = wmti.organization_id
7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

Line 7393: WIP_CONSTANTS.RETASSY_ACTION,

7389: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7390: WIP_CONSTANTS.LOTBASED) /*WSM */
7391: -- Fixed bug2515712 (do not insert component related record)
7392: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7393: WIP_CONSTANTS.RETASSY_ACTION,
7394: WIP_CONSTANTS.CPLASSY_ACTION)
7395: AND mp.organization_id = wmti.organization_id
7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7397: WIP_CONSTANTS.COST_FIFO,

Line 7394: WIP_CONSTANTS.CPLASSY_ACTION)

7390: WIP_CONSTANTS.LOTBASED) /*WSM */
7391: -- Fixed bug2515712 (do not insert component related record)
7392: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7393: WIP_CONSTANTS.RETASSY_ACTION,
7394: WIP_CONSTANTS.CPLASSY_ACTION)
7395: AND mp.organization_id = wmti.organization_id
7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7397: WIP_CONSTANTS.COST_FIFO,
7398: WIP_CONSTANTS.COST_LIFO)

Line 7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

7392: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7393: WIP_CONSTANTS.RETASSY_ACTION,
7394: WIP_CONSTANTS.CPLASSY_ACTION)
7395: AND mp.organization_id = wmti.organization_id
7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7397: WIP_CONSTANTS.COST_FIFO,
7398: WIP_CONSTANTS.COST_LIFO)
7399: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7400: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7397: WIP_CONSTANTS.COST_FIFO,

7393: WIP_CONSTANTS.RETASSY_ACTION,
7394: WIP_CONSTANTS.CPLASSY_ACTION)
7395: AND mp.organization_id = wmti.organization_id
7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7397: WIP_CONSTANTS.COST_FIFO,
7398: WIP_CONSTANTS.COST_LIFO)
7399: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7400: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7401: AND wmti.scrap_account_id IS NOT NULL)

Line 7398: WIP_CONSTANTS.COST_LIFO)

7394: WIP_CONSTANTS.CPLASSY_ACTION)
7395: AND mp.organization_id = wmti.organization_id
7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7397: WIP_CONSTANTS.COST_FIFO,
7398: WIP_CONSTANTS.COST_LIFO)
7399: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7400: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7401: AND wmti.scrap_account_id IS NOT NULL)
7402: -- Fix bug 2369642

Line 7399: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7395: AND mp.organization_id = wmti.organization_id
7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7397: WIP_CONSTANTS.COST_FIFO,
7398: WIP_CONSTANTS.COST_LIFO)
7399: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7400: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7401: AND wmti.scrap_account_id IS NOT NULL)
7402: -- Fix bug 2369642
7403: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

Line 7400: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7396: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7397: WIP_CONSTANTS.COST_FIFO,
7398: WIP_CONSTANTS.COST_LIFO)
7399: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7400: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7401: AND wmti.scrap_account_id IS NOT NULL)
7402: -- Fix bug 2369642
7403: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7404: OR

Line 7403: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

7399: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7400: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7401: AND wmti.scrap_account_id IS NOT NULL)
7402: -- Fix bug 2369642
7403: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7404: OR
7405: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7406: WIP_CONSTANTS.RET_TXN)));
7407:

Line 7405: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

7401: AND wmti.scrap_account_id IS NOT NULL)
7402: -- Fix bug 2369642
7403: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7404: OR
7405: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7406: WIP_CONSTANTS.RET_TXN)));
7407:
7408: l_params wip_logger.param_tbl_t;
7409: l_returnStatus VARCHAR(1);

Line 7406: WIP_CONSTANTS.RET_TXN)));

7402: -- Fix bug 2369642
7403: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7404: OR
7405: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7406: WIP_CONSTANTS.RET_TXN)));
7407:
7408: l_params wip_logger.param_tbl_t;
7409: l_returnStatus VARCHAR(1);
7410: l_errMsg VARCHAR(240);

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

7417: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7418:
7419: BEGIN
7420: -- write parameter value to log file
7421: IF (l_logLevel <= wip_constants.trace_logging) THEN
7422: l_params(1).paramName := 'p_group_id';
7423: l_params(1).paramValue := p_group_id;
7424: l_params(2).paramName := 'p_txn_date';
7425: l_params(2).paramValue := p_txn_date;

Line 7440: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7436: FROM wip_move_txn_interface wmti,
7437: mtl_parameters mp
7438: -- wip_parameters wp
7439: WHERE wmti.group_id = p_group_id
7440: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7441: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7442: AND wmti.organization_id = mp.organization_id
7443: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7444: WIP_CONSTANTS.COST_FIFO,

Line 7441: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7437: mtl_parameters mp
7438: -- wip_parameters wp
7439: WHERE wmti.group_id = p_group_id
7440: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7441: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7442: AND wmti.organization_id = mp.organization_id
7443: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7444: WIP_CONSTANTS.COST_FIFO,
7445: WIP_CONSTANTS.COST_LIFO)

Line 7443: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

7439: WHERE wmti.group_id = p_group_id
7440: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7441: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7442: AND wmti.organization_id = mp.organization_id
7443: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7444: WIP_CONSTANTS.COST_FIFO,
7445: WIP_CONSTANTS.COST_LIFO)
7446: --AND wp.organization_id = wmti.organization_id
7447: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

Line 7444: WIP_CONSTANTS.COST_FIFO,

7440: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7441: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7442: AND wmti.organization_id = mp.organization_id
7443: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7444: WIP_CONSTANTS.COST_FIFO,
7445: WIP_CONSTANTS.COST_LIFO)
7446: --AND wp.organization_id = wmti.organization_id
7447: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7448: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7445: WIP_CONSTANTS.COST_LIFO)

7441: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7442: AND wmti.organization_id = mp.organization_id
7443: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7444: WIP_CONSTANTS.COST_FIFO,
7445: WIP_CONSTANTS.COST_LIFO)
7446: --AND wp.organization_id = wmti.organization_id
7447: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7448: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7449: AND wmti.scrap_account_id IS NOT NULL)

Line 7447: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7443: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7444: WIP_CONSTANTS.COST_FIFO,
7445: WIP_CONSTANTS.COST_LIFO)
7446: --AND wp.organization_id = wmti.organization_id
7447: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7448: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7449: AND wmti.scrap_account_id IS NOT NULL)
7450: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7451: OR

Line 7448: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7444: WIP_CONSTANTS.COST_FIFO,
7445: WIP_CONSTANTS.COST_LIFO)
7446: --AND wp.organization_id = wmti.organization_id
7447: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7448: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7449: AND wmti.scrap_account_id IS NOT NULL)
7450: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7451: OR
7452: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

Line 7450: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

7446: --AND wp.organization_id = wmti.organization_id
7447: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7448: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7449: AND wmti.scrap_account_id IS NOT NULL)
7450: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7451: OR
7452: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7453: WIP_CONSTANTS.RET_TXN)));
7454:

Line 7452: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

7448: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7449: AND wmti.scrap_account_id IS NOT NULL)
7450: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7451: OR
7452: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7453: WIP_CONSTANTS.RET_TXN)));
7454:
7455: IF(l_num_snapshot = 0) THEN
7456: GOTO END_txn;

Line 7453: WIP_CONSTANTS.RET_TXN)));

7449: AND wmti.scrap_account_id IS NOT NULL)
7450: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7451: OR
7452: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7453: WIP_CONSTANTS.RET_TXN)));
7454:
7455: IF(l_num_snapshot = 0) THEN
7456: GOTO END_txn;
7457: END IF;

Line 7469: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7465: mtl_parameters mp,
7466: mtl_material_transactions_temp mmtt2
7467: WHERE wmti.group_id = p_group_id
7468: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7469: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7470: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7471: AND mmtt2.organization_id = wmti.organization_id
7472: AND mmtt2.transaction_source_id = wmti.wip_entity_id
7473: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED

Line 7470: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7466: mtl_material_transactions_temp mmtt2
7467: WHERE wmti.group_id = p_group_id
7468: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7469: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7470: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7471: AND mmtt2.organization_id = wmti.organization_id
7472: AND mmtt2.transaction_source_id = wmti.wip_entity_id
7473: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7474: -- AND wp.organization_id = wmti.organization_id

Line 7476: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

7472: AND mmtt2.transaction_source_id = wmti.wip_entity_id
7473: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7474: -- AND wp.organization_id = wmti.organization_id
7475: AND mp.organization_id = wmti.organization_id
7476: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7477: WIP_CONSTANTS.COST_FIFO,
7478: WIP_CONSTANTS.COST_LIFO)
7479: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7477: WIP_CONSTANTS.COST_FIFO,

7473: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7474: -- AND wp.organization_id = wmti.organization_id
7475: AND mp.organization_id = wmti.organization_id
7476: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7477: WIP_CONSTANTS.COST_FIFO,
7478: WIP_CONSTANTS.COST_LIFO)
7479: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7481: AND wmti.scrap_account_id IS NOT NULL)

Line 7478: WIP_CONSTANTS.COST_LIFO)

7474: -- AND wp.organization_id = wmti.organization_id
7475: AND mp.organization_id = wmti.organization_id
7476: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7477: WIP_CONSTANTS.COST_FIFO,
7478: WIP_CONSTANTS.COST_LIFO)
7479: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7481: AND wmti.scrap_account_id IS NOT NULL)
7482: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

Line 7479: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7475: AND mp.organization_id = wmti.organization_id
7476: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7477: WIP_CONSTANTS.COST_FIFO,
7478: WIP_CONSTANTS.COST_LIFO)
7479: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7481: AND wmti.scrap_account_id IS NOT NULL)
7482: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7483: OR

Line 7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7476: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7477: WIP_CONSTANTS.COST_FIFO,
7478: WIP_CONSTANTS.COST_LIFO)
7479: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7481: AND wmti.scrap_account_id IS NOT NULL)
7482: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7483: OR
7484: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

Line 7482: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

7478: WIP_CONSTANTS.COST_LIFO)
7479: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7481: AND wmti.scrap_account_id IS NOT NULL)
7482: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7483: OR
7484: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7485: WIP_CONSTANTS.RET_TXN))))
7486: AND mmtt1.transaction_source_type_id = TPS_INV_JOB_OR_SCHED

Line 7484: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

7480: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7481: AND wmti.scrap_account_id IS NOT NULL)
7482: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7483: OR
7484: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7485: WIP_CONSTANTS.RET_TXN))))
7486: AND mmtt1.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7487: AND mmtt1.transaction_temp_id IS NULL;
7488:

Line 7485: WIP_CONSTANTS.RET_TXN))))

7481: AND wmti.scrap_account_id IS NOT NULL)
7482: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7483: OR
7484: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7485: WIP_CONSTANTS.RET_TXN))))
7486: AND mmtt1.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7487: AND mmtt1.transaction_temp_id IS NULL;
7488:
7489: l_interface_table := 2; -- MOVE_TXN_INTERFACE

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

7520: <>
7521: x_returnStatus := fnd_api.g_ret_sts_success;
7522:
7523: -- write to the log file
7524: IF (l_logLevel <= wip_constants.trace_logging) THEN
7525: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_background',
7526: p_procReturnStatus => x_returnStatus,
7527: p_msg => 'procedure complete',
7528: x_returnStatus => l_returnStatus);

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

7531: EXCEPTION
7532: WHEN fnd_api.g_exc_unexpected_error THEN
7533: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7534:
7535: IF (l_logLevel <= wip_constants.trace_logging) THEN
7536: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.snapshot_background',
7537: p_procReturnStatus => x_returnStatus,
7538: p_msg => l_errMsg,
7539: x_returnStatus => l_returnStatus);

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

7542: WHEN others THEN
7543: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7544: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7545:
7546: IF (l_logLevel <= wip_constants.trace_logging) THEN
7547: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.snapshot_background',
7548: p_procReturnStatus => x_returnStatus,
7549: p_msg => l_errMsg,
7550: x_returnStatus => l_returnStatus);

Line 7568: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7564: SELECT wmti.transaction_id txn_id
7565: FROM wip_move_txn_interface wmti
7566: WHERE wmti.group_id = p_gib.group_id
7567: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7568: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7569: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7570: ORDER BY wmti.transaction_date;
7571:
7572: l_move_rec c_move_rec%ROWTYPE;

Line 7569: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7565: FROM wip_move_txn_interface wmti
7566: WHERE wmti.group_id = p_gib.group_id
7567: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7568: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7569: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7570: ORDER BY wmti.transaction_date;
7571:
7572: l_move_rec c_move_rec%ROWTYPE;
7573: l_returnStatus VARCHAR(1);

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

7574: l_errMsg VARCHAR(240);
7575: l_params wip_logger.param_tbl_t;
7576: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7577: BEGIN
7578: IF (l_logLevel <= wip_constants.trace_logging) THEN
7579: l_params(1).paramName := 'p_gib.group_id';
7580: l_params(1).paramValue := p_gib.group_id;
7581: l_params(2).paramName := 'p_gib.txn_date';
7582: l_params(2).paramValue := p_gib.txn_date;

Line 7590: IF(p_gib.seq_move = WIP_CONSTANTS.YES) THEN

7586: p_params => l_params,
7587: x_returnStatus => l_returnStatus);
7588: END IF;
7589:
7590: IF(p_gib.seq_move = WIP_CONSTANTS.YES) THEN
7591: -- update quantity_completed and take snapshot one record at a time
7592: FOR l_move_rec IN c_move_rec LOOP
7593: update_complete_qty(p_gib => p_gib,
7594: p_txn_id => l_move_rec.txn_id,

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

7630: END IF;
7631:
7632: x_returnStatus := fnd_api.g_ret_sts_success;
7633: -- write to the log file
7634: IF (l_logLevel <= wip_constants.trace_logging) THEN
7635: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.update_wo_and_snapshot',
7636: p_procReturnStatus => x_returnStatus,
7637: p_msg => 'procedure complete',
7638: x_returnStatus => l_returnStatus);

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

7639: END IF;
7640: EXCEPTION
7641: WHEN fnd_api.g_exc_unexpected_error THEN
7642: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7643: IF (l_logLevel <= wip_constants.trace_logging) THEN
7644: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.update_wo_and_snapshot',
7645: p_procReturnStatus => x_returnStatus,
7646: p_msg => l_errMsg,
7647: x_returnStatus => l_returnStatus);

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

7650: WHEN others THEN
7651: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7652: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7653:
7654: IF (l_logLevel <= wip_constants.trace_logging) THEN
7655: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_wo_and_snapshot',
7656: p_procReturnStatus => x_returnStatus,
7657: p_msg => l_errMsg,
7658: x_returnStatus => l_returnStatus);

Line 7690: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7686: AND mmtt.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7687: /* End Improve performance */
7688: AND wmti.group_id = p_gib.group_id
7689: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7690: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7691: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7692: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7693: AND wmti.scrap_account_id IS NOT NULL
7694: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR

Line 7691: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7687: /* End Improve performance */
7688: AND wmti.group_id = p_gib.group_id
7689: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7690: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7691: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7692: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7693: AND wmti.scrap_account_id IS NOT NULL
7694: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7695: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);

Line 7692: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

7688: AND wmti.group_id = p_gib.group_id
7689: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7690: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7691: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7692: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7693: AND wmti.scrap_account_id IS NOT NULL
7694: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7695: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7696:

Line 7694: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR

7690: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7691: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7692: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7693: AND wmti.scrap_account_id IS NOT NULL
7694: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7695: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7696:
7697: CURSOR c_update_po IS
7698: SELECT wmti.wip_entity_id job_id,

Line 7695: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);

7691: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7692: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7693: AND wmti.scrap_account_id IS NOT NULL
7694: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7695: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7696:
7697: CURSOR c_update_po IS
7698: SELECT wmti.wip_entity_id job_id,
7699: DECODE(wmti.entity_type,

Line 7700: WIP_CONSTANTS.REPETITIVE, wmta.repetitive_schedule_id,

7696:
7697: CURSOR c_update_po IS
7698: SELECT wmti.wip_entity_id job_id,
7699: DECODE(wmti.entity_type,
7700: WIP_CONSTANTS.REPETITIVE, wmta.repetitive_schedule_id,
7701: NULL) rep_id,
7702: wmti.organization_id org_id,
7703: DECODE (wmti.fm_intraoperation_step_type,
7704: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,

Line 7704: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,

7700: WIP_CONSTANTS.REPETITIVE, wmta.repetitive_schedule_id,
7701: NULL) rep_id,
7702: wmti.organization_id org_id,
7703: DECODE (wmti.fm_intraoperation_step_type,
7704: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,
7705: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,
7706: wmti.primary_quantity),
7707: -1 * DECODE(wmti.entity_type,
7708: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,

Line 7705: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,

7701: NULL) rep_id,
7702: wmti.organization_id org_id,
7703: DECODE (wmti.fm_intraoperation_step_type,
7704: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,
7705: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,
7706: wmti.primary_quantity),
7707: -1 * DECODE(wmti.entity_type,
7708: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,
7709: wmti.primary_quantity)) changed_qty,

Line 7708: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,

7704: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,
7705: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,
7706: wmti.primary_quantity),
7707: -1 * DECODE(wmti.entity_type,
7708: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,
7709: wmti.primary_quantity)) changed_qty,
7710: GREATEST(wmti.fm_operation_seq_num, wmti.to_operation_seq_num) fm_op
7711: FROM wip_move_txn_interface wmti,
7712: wip_move_txn_allocations wmta,

Line 7718: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7714: WHERE wmti.transaction_id = wmta.transaction_id (+)
7715: AND wmti.organization_id = wmta.organization_id (+)
7716: AND wmti.group_id = p_gib.group_id
7717: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7718: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7719: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7720: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND

Line 7719: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7715: AND wmti.organization_id = wmta.organization_id (+)
7716: AND wmti.group_id = p_gib.group_id
7717: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7718: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7719: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7720: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7723: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7720: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR

7716: AND wmti.group_id = p_gib.group_id
7717: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7718: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7719: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7720: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7723: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7724: AND mp.organization_id = wmti.organization_id

Line 7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7717: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7718: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7719: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7720: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7723: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7724: AND mp.organization_id = wmti.organization_id
7725: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;

Line 7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND

7718: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7719: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7720: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7723: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7724: AND mp.organization_id = wmti.organization_id
7725: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;
7726:

Line 7723: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7719: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7720: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7723: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7724: AND mp.organization_id = wmti.organization_id
7725: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;
7726:
7727:

Line 7725: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;

7721: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7722: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7723: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7724: AND mp.organization_id = wmti.organization_id
7725: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;
7726:
7727:
7728: l_params wip_logger.param_tbl_t;
7729: l_mtl_alloc c_mtl_alloc%ROWTYPE;

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

7741: BEGIN
7742: l_move := p_gib.move_profile;
7743:
7744: -- write parameter value to log file
7745: IF (l_logLevel <= wip_constants.trace_logging) THEN
7746: l_params(1).paramName := 'p_group_id';
7747: l_params(1).paramValue := p_gib.group_id;
7748: l_params(2).paramName := 'p_txn_date';
7749: l_params(2).paramValue := p_gib.txn_date;

Line 7792: IF(l_move.scrapTxn <> WIP_CONSTANTS.YES AND

7788: x_returnStatus => l_returnStatus);
7789: END IF;
7790:
7791: -- Any scrap transaction?
7792: IF(l_move.scrapTxn <> WIP_CONSTANTS.YES AND
7793: l_move.scrapTxn <> WIP_CONSTANTS.NO) THEN -- Indeterminate
7794:
7795: SELECT COUNT(1)
7796: INTO l_scrap_flag

Line 7793: l_move.scrapTxn <> WIP_CONSTANTS.NO) THEN -- Indeterminate

7789: END IF;
7790:
7791: -- Any scrap transaction?
7792: IF(l_move.scrapTxn <> WIP_CONSTANTS.YES AND
7793: l_move.scrapTxn <> WIP_CONSTANTS.NO) THEN -- Indeterminate
7794:
7795: SELECT COUNT(1)
7796: INTO l_scrap_flag
7797: FROM wip_move_txn_interface

Line 7800: AND process_phase = WIP_CONSTANTS.MOVE_PROC

7796: INTO l_scrap_flag
7797: FROM wip_move_txn_interface
7798: WHERE group_id = p_gib.group_id
7799: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
7800: AND process_phase = WIP_CONSTANTS.MOVE_PROC
7801: AND process_status = WIP_CONSTANTS.RUNNING
7802: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7803: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7804:

Line 7801: AND process_status = WIP_CONSTANTS.RUNNING

7797: FROM wip_move_txn_interface
7798: WHERE group_id = p_gib.group_id
7799: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
7800: AND process_phase = WIP_CONSTANTS.MOVE_PROC
7801: AND process_status = WIP_CONSTANTS.RUNNING
7802: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7803: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7804:
7805: IF (l_scrap_flag > 0) THEN

Line 7802: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7798: WHERE group_id = p_gib.group_id
7799: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
7800: AND process_phase = WIP_CONSTANTS.MOVE_PROC
7801: AND process_status = WIP_CONSTANTS.RUNNING
7802: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7803: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7804:
7805: IF (l_scrap_flag > 0) THEN
7806: l_move.scrapTxn := WIP_CONSTANTS.YES;

Line 7803: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);

7799: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
7800: AND process_phase = WIP_CONSTANTS.MOVE_PROC
7801: AND process_status = WIP_CONSTANTS.RUNNING
7802: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7803: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7804:
7805: IF (l_scrap_flag > 0) THEN
7806: l_move.scrapTxn := WIP_CONSTANTS.YES;
7807: ELSE

Line 7806: l_move.scrapTxn := WIP_CONSTANTS.YES;

7802: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7803: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7804:
7805: IF (l_scrap_flag > 0) THEN
7806: l_move.scrapTxn := WIP_CONSTANTS.YES;
7807: ELSE
7808: l_move.scrapTxn := WIP_CONSTANTS.NO;
7809: END IF;
7810:

Line 7808: l_move.scrapTxn := WIP_CONSTANTS.NO;

7804:
7805: IF (l_scrap_flag > 0) THEN
7806: l_move.scrapTxn := WIP_CONSTANTS.YES;
7807: ELSE
7808: l_move.scrapTxn := WIP_CONSTANTS.NO;
7809: END IF;
7810:
7811: END IF; -- scrap txn indeterminate
7812:

Line 7814: IF(l_move.scrapTxn = WIP_CONSTANTS.YES) THEN

7810:
7811: END IF; -- scrap txn indeterminate
7812:
7813: -- Scrap transaction
7814: IF(l_move.scrapTxn = WIP_CONSTANTS.YES) THEN
7815: /*------------------------------------------------------------+
7816: | Update scrap quantity for discrete jobs
7817: +------------------------------------------------------------*/
7818: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

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

7814: IF(l_move.scrapTxn = WIP_CONSTANTS.YES) THEN
7815: /*------------------------------------------------------------+
7816: | Update scrap quantity for discrete jobs
7817: +------------------------------------------------------------*/
7818: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
7819:
7820: /** 3050846 **/
7821: wip_so_reservations.scrap_txn_relieve_rsv ( p_group_id => p_gib.group_id,
7822: x_return_status => l_returnstatus,

Line 7859: WIP_CONSTANTS.SCRAP, wmti.primary_quantity,0)

7855: program_update_date
7856: ) =
7857: (SELECT wdj.quantity_scrapped -- quantity_scrapped
7858: + SUM(DECODE(wmti.to_intraoperation_step_type,
7859: WIP_CONSTANTS.SCRAP, wmti.primary_quantity,0)
7860: - DECODE(wmti.fm_intraoperation_step_type,
7861: WIP_CONSTANTS.SCRAP,wmti.primary_quantity,0)),
7862: MAX(wmti.last_updated_by),
7863: SYSDATE, -- last_update_date

Line 7861: WIP_CONSTANTS.SCRAP,wmti.primary_quantity,0)),

7857: (SELECT wdj.quantity_scrapped -- quantity_scrapped
7858: + SUM(DECODE(wmti.to_intraoperation_step_type,
7859: WIP_CONSTANTS.SCRAP, wmti.primary_quantity,0)
7860: - DECODE(wmti.fm_intraoperation_step_type,
7861: WIP_CONSTANTS.SCRAP,wmti.primary_quantity,0)),
7862: MAX(wmti.last_updated_by),
7863: SYSDATE, -- last_update_date
7864: DECODE(p_gib.login_id,-1,NULL,p_gib.login_id),
7865: DECODE(p_gib.request_id,-1,NULL,p_gib.request_id),

Line 7874: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7870: FROM wip_discrete_jobs wdj1, wip_move_txn_interface wmti
7871: WHERE wdj1.rowid = wdj.rowid
7872: AND wmti.group_id = p_gib.group_id
7873: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7874: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7875: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7876: AND wmti.organization_id = wdj1.organization_id
7877: AND wmti.wip_entity_id = wdj1.wip_entity_id
7878: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 7875: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7871: WHERE wdj1.rowid = wdj.rowid
7872: AND wmti.group_id = p_gib.group_id
7873: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7874: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7875: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7876: AND wmti.organization_id = wdj1.organization_id
7877: AND wmti.wip_entity_id = wdj1.wip_entity_id
7878: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7879: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */

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

7874: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7875: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7876: AND wmti.organization_id = wdj1.organization_id
7877: AND wmti.wip_entity_id = wdj1.wip_entity_id
7878: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7879: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7880: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7881: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7882: )

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

7875: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7876: AND wmti.organization_id = wdj1.organization_id
7877: AND wmti.wip_entity_id = wdj1.wip_entity_id
7878: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7879: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7880: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7881: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7882: )
7883: WHERE wdj.rowid IN

Line 7880: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7876: AND wmti.organization_id = wdj1.organization_id
7877: AND wmti.wip_entity_id = wdj1.wip_entity_id
7878: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7879: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7880: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7881: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7882: )
7883: WHERE wdj.rowid IN
7884: (SELECT wdj2.rowid

Line 7881: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7877: AND wmti.wip_entity_id = wdj1.wip_entity_id
7878: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7879: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7880: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7881: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7882: )
7883: WHERE wdj.rowid IN
7884: (SELECT wdj2.rowid
7885: FROM wip_discrete_jobs wdj2,

Line 7889: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7885: FROM wip_discrete_jobs wdj2,
7886: wip_move_txn_interface wmti
7887: WHERE wmti.group_id = p_gib.group_id
7888: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7889: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7890: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7891: AND wmti.organization_id = wdj2.organization_id
7892: AND wmti.wip_entity_id = wdj2.wip_entity_id
7893: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 7890: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7886: wip_move_txn_interface wmti
7887: WHERE wmti.group_id = p_gib.group_id
7888: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7889: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7890: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7891: AND wmti.organization_id = wdj2.organization_id
7892: AND wmti.wip_entity_id = wdj2.wip_entity_id
7893: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7894: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/

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

7889: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7890: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7891: AND wmti.organization_id = wdj2.organization_id
7892: AND wmti.wip_entity_id = wdj2.wip_entity_id
7893: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7894: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7896: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7897: );

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

7890: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7891: AND wmti.organization_id = wdj2.organization_id
7892: AND wmti.wip_entity_id = wdj2.wip_entity_id
7893: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7894: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7896: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7897: );
7898: /* Now we will also update the column status_type to "Complete" IF

Line 7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7891: AND wmti.organization_id = wdj2.organization_id
7892: AND wmti.wip_entity_id = wdj2.wip_entity_id
7893: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7894: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7896: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7897: );
7898: /* Now we will also update the column status_type to "Complete" IF
7899: these scrap completions will finish off the remaining quantity to be

Line 7896: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7892: AND wmti.wip_entity_id = wdj2.wip_entity_id
7893: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7894: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7896: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7897: );
7898: /* Now we will also update the column status_type to "Complete" IF
7899: these scrap completions will finish off the remaining quantity to be
7900: completed, or update it to "Released" IF moving these assemblies back

Line 7909: (SELECT WIP_CONSTANTS.COMP_CHRG, -- status_type

7905: UPDATE wip_discrete_jobs wdj
7906: SET (status_type,
7907: date_completed
7908: ) =
7909: (SELECT WIP_CONSTANTS.COMP_CHRG, -- status_type
7910: SYSDATE -- date_completed
7911: FROM DUAL)
7912: WHERE wdj.rowid IN
7913: (SELECT wdj2.rowid

Line 7918: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7914: FROM wip_discrete_jobs wdj2,
7915: wip_move_txn_interface wmti
7916: WHERE wmti.group_id = p_gib.group_id
7917: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7918: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7919: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7920: AND wmti.organization_id = wdj2.organization_id
7921: AND wmti.wip_entity_id = wdj2.wip_entity_id
7922: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 7919: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7915: wip_move_txn_interface wmti
7916: WHERE wmti.group_id = p_gib.group_id
7917: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7918: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7919: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7920: AND wmti.organization_id = wdj2.organization_id
7921: AND wmti.wip_entity_id = wdj2.wip_entity_id
7922: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7923: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */

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

7918: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7919: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7920: AND wmti.organization_id = wdj2.organization_id
7921: AND wmti.wip_entity_id = wdj2.wip_entity_id
7922: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7923: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7924: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7925: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7926: AND (wdj2.start_quantity - wdj2.quantity_completed -

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

7919: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7920: AND wmti.organization_id = wdj2.organization_id
7921: AND wmti.wip_entity_id = wdj2.wip_entity_id
7922: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7923: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7924: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7925: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7926: AND (wdj2.start_quantity - wdj2.quantity_completed -
7927: wdj2.quantity_scrapped) <= 0);

Line 7924: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7920: AND wmti.organization_id = wdj2.organization_id
7921: AND wmti.wip_entity_id = wdj2.wip_entity_id
7922: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7923: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7924: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7925: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7926: AND (wdj2.start_quantity - wdj2.quantity_completed -
7927: wdj2.quantity_scrapped) <= 0);
7928:

Line 7925: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7921: AND wmti.wip_entity_id = wdj2.wip_entity_id
7922: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7923: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
7924: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7925: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7926: AND (wdj2.start_quantity - wdj2.quantity_completed -
7927: wdj2.quantity_scrapped) <= 0);
7928:
7929: UPDATE wip_discrete_jobs wdj

Line 7930: SET status_type = WIP_CONSTANTS.RELEASED,

7926: AND (wdj2.start_quantity - wdj2.quantity_completed -
7927: wdj2.quantity_scrapped) <= 0);
7928:
7929: UPDATE wip_discrete_jobs wdj
7930: SET status_type = WIP_CONSTANTS.RELEASED,
7931: /*bug 3933240 -> nullify date_completed while changing the status of job to
7932: released */
7933: date_completed = null
7934: WHERE wdj.rowid IN

Line 7940: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7936: FROM wip_discrete_jobs wdj2,
7937: wip_move_txn_interface wmti
7938: WHERE wmti.group_id = p_gib.group_id
7939: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7940: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7941: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7942: AND wmti.organization_id = wdj2.organization_id
7943: AND wmti.wip_entity_id = wdj2.wip_entity_id
7944: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 7941: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7937: wip_move_txn_interface wmti
7938: WHERE wmti.group_id = p_gib.group_id
7939: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7940: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7941: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7942: AND wmti.organization_id = wdj2.organization_id
7943: AND wmti.wip_entity_id = wdj2.wip_entity_id
7944: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7945: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/

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

7940: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7941: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7942: AND wmti.organization_id = wdj2.organization_id
7943: AND wmti.wip_entity_id = wdj2.wip_entity_id
7944: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7945: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7946: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7947: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7948: AND (wdj2.start_quantity - wdj2.quantity_completed -

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

7941: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7942: AND wmti.organization_id = wdj2.organization_id
7943: AND wmti.wip_entity_id = wdj2.wip_entity_id
7944: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7945: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7946: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7947: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7948: AND (wdj2.start_quantity - wdj2.quantity_completed -
7949: wdj2.quantity_scrapped) > 0);

Line 7946: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7942: AND wmti.organization_id = wdj2.organization_id
7943: AND wmti.wip_entity_id = wdj2.wip_entity_id
7944: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7945: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7946: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7947: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7948: AND (wdj2.start_quantity - wdj2.quantity_completed -
7949: wdj2.quantity_scrapped) > 0);
7950:

Line 7947: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7943: AND wmti.wip_entity_id = wdj2.wip_entity_id
7944: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
7945: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
7946: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7947: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7948: AND (wdj2.start_quantity - wdj2.quantity_completed -
7949: wdj2.quantity_scrapped) > 0);
7950:
7951: -- IF debug message level = 2, write statement below to log file

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

7948: AND (wdj2.start_quantity - wdj2.quantity_completed -
7949: wdj2.quantity_scrapped) > 0);
7950:
7951: -- IF debug message level = 2, write statement below to log file
7952: IF (l_logLevel <= wip_constants.full_logging) THEN
7953: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
7954: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
7955: fnd_message.set_token('ENTITY2', 'WIP_DISCRETE_JOBS');
7956: l_msg := fnd_message.get;

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

7961:
7962: /*------------------------------------------------------------+
7963: | Update scrap quantity for repetitive schedule
7964: +------------------------------------------------------------*/
7965: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
7966: /*------------------------------------------------------------------+
7967: | For repetitive schedules, we do not set the date_closed, since this
7968: | is only done manually, via the form. It is not set automatically for
7969: | regular completions, so we will not set it here. rkaiser

Line 7977: 1, WIP_CONSTANTS.RELEASED,

7973: (SELECT DECODE(SIGN(
7974: (wrs.daily_production_rate * wrs.processing_work_days -
7975: wrs.quantity_completed) -
7976: SUM(NVL(wo.quantity_scrapped, 0))),
7977: 1, WIP_CONSTANTS.RELEASED,
7978: WIP_CONSTANTS.COMP_CHRG)
7979: FROM wip_operations wo
7980: WHERE wo.organization_id = wrs.organization_id
7981: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)

Line 7978: WIP_CONSTANTS.COMP_CHRG)

7974: (wrs.daily_production_rate * wrs.processing_work_days -
7975: wrs.quantity_completed) -
7976: SUM(NVL(wo.quantity_scrapped, 0))),
7977: 1, WIP_CONSTANTS.RELEASED,
7978: WIP_CONSTANTS.COMP_CHRG)
7979: FROM wip_operations wo
7980: WHERE wo.organization_id = wrs.organization_id
7981: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)
7982: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,

Line 7982: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,

7978: WIP_CONSTANTS.COMP_CHRG)
7979: FROM wip_operations wo
7980: WHERE wo.organization_id = wrs.organization_id
7981: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)
7982: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,
7983: WIP_CONSTANTS.COMP_CHRG)
7984: AND wrs.rowid IN
7985: (SELECT wrs2.rowid
7986: FROM wip_repetitive_schedules wrs2,

Line 7983: WIP_CONSTANTS.COMP_CHRG)

7979: FROM wip_operations wo
7980: WHERE wo.organization_id = wrs.organization_id
7981: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)
7982: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,
7983: WIP_CONSTANTS.COMP_CHRG)
7984: AND wrs.rowid IN
7985: (SELECT wrs2.rowid
7986: FROM wip_repetitive_schedules wrs2,
7987: wip_move_txn_interface wmti

Line 7990: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7986: FROM wip_repetitive_schedules wrs2,
7987: wip_move_txn_interface wmti
7988: WHERE wmti.group_id = p_gib.group_id
7989: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7990: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7991: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7992: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7993: AND wrs2.wip_entity_id = wmti.wip_entity_id
7994: AND wrs2.organization_id = wmti.organization_id

Line 7991: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7987: wip_move_txn_interface wmti
7988: WHERE wmti.group_id = p_gib.group_id
7989: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7990: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7991: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7992: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7993: AND wrs2.wip_entity_id = wmti.wip_entity_id
7994: AND wrs2.organization_id = wmti.organization_id
7995: AND wrs2.line_id = wmti.line_id

Line 7992: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

7988: WHERE wmti.group_id = p_gib.group_id
7989: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7990: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7991: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7992: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7993: AND wrs2.wip_entity_id = wmti.wip_entity_id
7994: AND wrs2.organization_id = wmti.organization_id
7995: AND wrs2.line_id = wmti.line_id
7996: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

Line 7996: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7992: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7993: AND wrs2.wip_entity_id = wmti.wip_entity_id
7994: AND wrs2.organization_id = wmti.organization_id
7995: AND wrs2.line_id = wmti.line_id
7996: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7997: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));
7998:
7999: -- IF debug message level = 2, write statement below to log file
8000: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 7997: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));

7993: AND wrs2.wip_entity_id = wmti.wip_entity_id
7994: AND wrs2.organization_id = wmti.organization_id
7995: AND wrs2.line_id = wmti.line_id
7996: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7997: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));
7998:
7999: -- IF debug message level = 2, write statement below to log file
8000: IF (l_logLevel <= wip_constants.full_logging) THEN
8001: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

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

7996: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7997: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));
7998:
7999: -- IF debug message level = 2, write statement below to log file
8000: IF (l_logLevel <= wip_constants.full_logging) THEN
8001: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
8002: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8003: fnd_message.set_token('ENTITY2', 'WIP_REPETITIVE_SCHEDULES');
8004: l_msg := fnd_message.get;

Line 8019: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND

8015: FROM DUAL;
8016: END IF;
8017:
8018: -- initialize transaction mode
8019: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8020: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8021: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8022: ELSE
8023: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

Line 8020: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN

8016: END IF;
8017:
8018: -- initialize transaction mode
8019: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8020: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8021: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8022: ELSE
8023: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8024: END IF;

Line 8021: l_transaction_mode := WIP_CONSTANTS.ONLINE;

8017:
8018: -- initialize transaction mode
8019: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8020: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8021: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8022: ELSE
8023: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8024: END IF;
8025:

Line 8023: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

8019: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8020: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8021: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8022: ELSE
8023: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8024: END IF;
8025:
8026: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP
8027:

Line 8026: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP

8022: ELSE
8023: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8024: END IF;
8025:
8026: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP
8027:
8028: -- Discrete and Lotbased jobs
8029: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8030: INSERT INTO mtl_material_transactions_temp

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

8025:
8026: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP
8027:
8028: -- Discrete and Lotbased jobs
8029: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8030: INSERT INTO mtl_material_transactions_temp
8031: (last_updated_by,
8032: last_update_date,
8033: last_update_login,

Line 8093: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,

8089: l_transaction_mode, -- transaction_mode
8090: wmti.primary_item_id, -- inventory_item_id
8091: -- Fixed bug 2387630
8092: DECODE(msi.revision_qty_control_code,
8093: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
8094: bom_revisions.get_item_revision_fn
8095: ('EXCLUDE_OPEN_HOLD', -- eco_status
8096: 'ALL', -- examine_type
8097: wmti.organization_id, -- org_id

Line 8104: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,

8100: )),
8101: NULL), -- revision
8102: wmti.organization_id,
8103: DECODE(l_step, -- transaction_quantity
8104: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8105: wmti.transaction_quantity),
8106: wmti.transaction_uom, -- transaction_uom
8107: DECODE(l_step, -- primary_quantity
8108: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

Line 8108: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

8104: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8105: wmti.transaction_quantity),
8106: wmti.transaction_uom, -- transaction_uom
8107: DECODE(l_step, -- primary_quantity
8108: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8109: wmti.primary_quantity),
8110: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8111: wmti.wip_entity_id, -- transaction_source_id
8112: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

Line 8112: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

8108: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8109: wmti.primary_quantity),
8110: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8111: wmti.wip_entity_id, -- transaction_source_id
8112: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8113: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8114: wmti.transaction_date,
8115: wmti.acct_period_id,
8116: wmti.scrap_account_id, -- distribution_account_id

Line 8113: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id

8109: wmti.primary_quantity),
8110: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8111: wmti.wip_entity_id, -- transaction_source_id
8112: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8113: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8114: wmti.transaction_date,
8115: wmti.acct_period_id,
8116: wmti.scrap_account_id, -- distribution_account_id
8117: NULL, -- transaction_cost

Line 8124: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,

8120: wmti.entity_type, -- wip_entity_type
8121: NULL, -- schedule_id
8122: wmti.line_id, -- repetitive_line_id
8123: DECODE(l_step, -- operation_seq_num
8124: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,
8125: wmti.to_operation_seq_num),
8126: wmti.transaction_id, -- move_transaction_id
8127: 'Y', -- process_flag
8128: 'N', -- lock_flag

Line 8134: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq

8130: wdj.project_id,
8131: wdj.task_id,
8132: p_gib.mtl_header_id, -- transaction_batch_id
8133: wmti.qa_collection_id, /*Added for Bug 7136450 (FP of 7126588 )*/
8134: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq
8135: FROM wip_move_txn_interface wmti,
8136: mtl_system_items msi,
8137: wip_discrete_jobs wdj
8138: WHERE wmti.group_id = p_gib.group_id

Line 8140: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8136: mtl_system_items msi,
8137: wip_discrete_jobs wdj
8138: WHERE wmti.group_id = p_gib.group_id
8139: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8140: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8141: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8142: AND wmti.scrap_account_id IS NOT NULL
8143: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8144: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/

Line 8141: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8137: wip_discrete_jobs wdj
8138: WHERE wmti.group_id = p_gib.group_id
8139: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8140: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8141: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8142: AND wmti.scrap_account_id IS NOT NULL
8143: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8144: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8145: AND wdj.wip_entity_id = wmti.wip_entity_id

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

8139: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8140: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8141: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8142: AND wmti.scrap_account_id IS NOT NULL
8143: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8144: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8145: AND wdj.wip_entity_id = wmti.wip_entity_id
8146: AND wdj.organization_id = wmti.organization_id
8147: AND DECODE(l_step,

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

8140: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8141: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8142: AND wmti.scrap_account_id IS NOT NULL
8143: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8144: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8145: AND wdj.wip_entity_id = wmti.wip_entity_id
8146: AND wdj.organization_id = wmti.organization_id
8147: AND DECODE(l_step,
8148: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,

Line 8148: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,

8144: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8145: AND wdj.wip_entity_id = wmti.wip_entity_id
8146: AND wdj.organization_id = wmti.organization_id
8147: AND DECODE(l_step,
8148: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8149: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8150: AND msi.organization_id = wmti.organization_id
8151: AND msi.inventory_item_id = wmti.primary_item_id;
8152:

Line 8149: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP

8145: AND wdj.wip_entity_id = wmti.wip_entity_id
8146: AND wdj.organization_id = wmti.organization_id
8147: AND DECODE(l_step,
8148: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8149: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8150: AND msi.organization_id = wmti.organization_id
8151: AND msi.inventory_item_id = wmti.primary_item_id;
8152:
8153: -- IF debug message level = 2, write statement below to log file

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

8150: AND msi.organization_id = wmti.organization_id
8151: AND msi.inventory_item_id = wmti.primary_item_id;
8152:
8153: -- IF debug message level = 2, write statement below to log file
8154: IF (l_logLevel <= wip_constants.full_logging) THEN
8155: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
8156: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8157: fnd_message.set_token('ENTITY2', 'MTL_MATERIAL_TRANSACTIONS_TEMP');
8158: l_msg := fnd_message.get;

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

8162:
8163: END IF; -- discrete jobs
8164:
8165: -- Repetitive schedules
8166: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
8167:
8168: INSERT INTO mtl_material_transactions_temp
8169: (material_allocation_temp_id,
8170: last_updated_by,

Line 8230: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,

8226: l_transaction_mode, -- transaction_mode
8227: wmti.primary_item_id, -- inventory_item_id
8228: -- Fixed bug 2387630
8229: DECODE(msi.revision_qty_control_code, -- revision
8230: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
8231: bom_revisions.get_item_revision_fn
8232: ('EXCLUDE_OPEN_HOLD', -- eco_status
8233: 'ALL', -- examine_type
8234: wmti.organization_id, -- org_id

Line 8241: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,

8237: )),
8238: NULL),
8239: wmti.organization_id,
8240: DECODE(l_step, -- transaction_quantity
8241: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8242: wmti.transaction_quantity),
8243: wmti.transaction_uom,
8244: DECODE(l_step, -- primary_quantity
8245: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

Line 8245: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

8241: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8242: wmti.transaction_quantity),
8243: wmti.transaction_uom,
8244: DECODE(l_step, -- primary_quantity
8245: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8246: wmti.primary_quantity),
8247: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8248: wmti.wip_entity_id, -- transaction_source_id
8249: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

Line 8249: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

8245: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8246: wmti.primary_quantity),
8247: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8248: wmti.wip_entity_id, -- transaction_source_id
8249: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8250: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8251: wmti.transaction_date,
8252: wmti.acct_period_id,
8253: wmti.scrap_account_id, -- distribution_account_id

Line 8250: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id

8246: wmti.primary_quantity),
8247: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8248: wmti.wip_entity_id, -- transaction_source_id
8249: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8250: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8251: wmti.transaction_date,
8252: wmti.acct_period_id,
8253: wmti.scrap_account_id, -- distribution_account_id
8254: NULL, -- transaction_cost

Line 8261: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,

8257: wmti.entity_type, -- wip_entity_type
8258: NULL, -- schedule_id
8259: wmti.line_id, -- repetitive_line_id
8260: DECODE(l_step, -- operation_seq_num
8261: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,
8262: wmti.to_operation_seq_num),
8263: wmti.transaction_id, -- move_transaction_id
8264: 'Y', -- process_flag
8265: 'N', -- lock_flag

Line 8268: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq

8264: 'Y', -- process_flag
8265: 'N', -- lock_flag
8266: 'Y', -- posting_flag
8267: p_gib.mtl_header_id, -- transaction_batch_id
8268: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq
8269: FROM wip_move_txn_interface wmti,
8270: mtl_system_items msi,
8271: wip_repetitive_schedules wrs
8272: WHERE wmti.group_id = p_gib.group_id

Line 8274: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8270: mtl_system_items msi,
8271: wip_repetitive_schedules wrs
8272: WHERE wmti.group_id = p_gib.group_id
8273: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8274: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8275: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8276: AND wmti.scrap_account_id IS NOT NULL
8277: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8278: AND wrs.wip_entity_id = wmti.wip_entity_id

Line 8275: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8271: wip_repetitive_schedules wrs
8272: WHERE wmti.group_id = p_gib.group_id
8273: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8274: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8275: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8276: AND wmti.scrap_account_id IS NOT NULL
8277: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8278: AND wrs.wip_entity_id = wmti.wip_entity_id
8279: AND wrs.organization_id = wmti.organization_id

Line 8277: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

8273: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8274: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8275: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8276: AND wmti.scrap_account_id IS NOT NULL
8277: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8278: AND wrs.wip_entity_id = wmti.wip_entity_id
8279: AND wrs.organization_id = wmti.organization_id
8280: AND wrs.line_id = wmti.line_id
8281: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id

Line 8283: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,

8279: AND wrs.organization_id = wmti.organization_id
8280: AND wrs.line_id = wmti.line_id
8281: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
8282: AND DECODE(l_step,
8283: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8284: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8285: AND msi.organization_id = wmti.organization_id
8286: AND msi.inventory_item_id = wmti.primary_item_id;
8287:

Line 8284: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP

8280: AND wrs.line_id = wmti.line_id
8281: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
8282: AND DECODE(l_step,
8283: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8284: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8285: AND msi.organization_id = wmti.organization_id
8286: AND msi.inventory_item_id = wmti.primary_item_id;
8287:
8288: -- IF debug message level = 2, write statement below to log file

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

8285: AND msi.organization_id = wmti.organization_id
8286: AND msi.inventory_item_id = wmti.primary_item_id;
8287:
8288: -- IF debug message level = 2, write statement below to log file
8289: IF (l_logLevel <= wip_constants.full_logging) THEN
8290: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
8291: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8292: fnd_message.set_token('ENTITY2', 'MTL_MATERIAL_TRANSACTIONS_TEMP');
8293: l_msg := fnd_message.get;

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

8296: END IF;
8297: END IF; -- Repetitive schedules
8298: END LOOP; -- FOR l_step
8299:
8300: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8301: /* Call snapshot for Discrete jobs and only in Avg costing Org. */
8302: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8303: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8304: p_org_id => l_move.org_id,

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

8298: END LOOP; -- FOR l_step
8299:
8300: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8301: /* Call snapshot for Discrete jobs and only in Avg costing Org. */
8302: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8303: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8304: p_org_id => l_move.org_id,
8305: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8306: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,

Line 8305: p_txn_type => WIP_CONSTANTS.MOVE_TXN,

8301: /* Call snapshot for Discrete jobs and only in Avg costing Org. */
8302: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8303: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8304: p_org_id => l_move.org_id,
8305: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8306: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,
8307: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,
8308: x_returnStatus => x_returnStatus);
8309:

Line 8306: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,

8302: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8303: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8304: p_org_id => l_move.org_id,
8305: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8306: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,
8307: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,
8308: x_returnStatus => x_returnStatus);
8309:
8310: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 8307: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,

8303: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8304: p_org_id => l_move.org_id,
8305: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8306: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,
8307: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,
8308: x_returnStatus => x_returnStatus);
8309:
8310: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8311: l_errMsg := 'wip_movProc_priv.snapshot_online failed';

Line 8329: p_is_scrap_txn => WIP_CONSTANTS.YES,

8325: p_org_id => l_update_po.org_id,
8326: p_changed_qty => l_update_po.changed_qty,
8327: p_fm_op => l_update_po.fm_op,
8328: /* Fix for Bug#4734309 */
8329: p_is_scrap_txn => WIP_CONSTANTS.YES,
8330: x_return_status => x_returnStatus);
8331:
8332: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8333: l_errMsg := 'wip_osp.updatePOReqQuantity failed';

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

8341: p_gib.move_profile := l_move;
8342: x_returnStatus := fnd_api.g_ret_sts_success;
8343:
8344: -- write to the log file
8345: IF (l_logLevel <= wip_constants.trace_logging) THEN
8346: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.scrap_txns',
8347: p_procReturnStatus => x_returnStatus,
8348: p_msg => 'procedure complete',
8349: x_returnStatus => l_returnStatus);

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

8351:
8352: EXCEPTION
8353: WHEN fnd_api.g_exc_unexpected_error THEN
8354: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
8355: IF (l_logLevel <= wip_constants.trace_logging) THEN
8356: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.scrap_txns',
8357: p_procReturnStatus => x_returnStatus,
8358: p_msg => l_errMsg,
8359: x_returnStatus => l_returnStatus);

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

8362: WHEN others THEN
8363: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
8364: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
8365:
8366: IF (l_logLevel <= wip_constants.trace_logging) THEN
8367: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.scrap_txns',
8368: p_procReturnStatus => x_returnStatus,
8369: p_msg => l_errMsg,
8370: x_returnStatus => l_returnStatus);

Line 8399: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE

8395: reason_id reason_id,
8396: transaction_reference reference
8397: FROM mtl_material_transactions_temp
8398: WHERE transaction_header_id = p_header_id
8399: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE
8400: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
8401: WIP_CONSTANTS.CPLASSY_ACTION);
8402:
8403: l_repAssembly c_repAssembly%ROWTYPE;

Line 8400: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,

8396: transaction_reference reference
8397: FROM mtl_material_transactions_temp
8398: WHERE transaction_header_id = p_header_id
8399: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE
8400: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
8401: WIP_CONSTANTS.CPLASSY_ACTION);
8402:
8403: l_repAssembly c_repAssembly%ROWTYPE;
8404: l_params wip_logger.param_tbl_t;

Line 8401: WIP_CONSTANTS.CPLASSY_ACTION);

8397: FROM mtl_material_transactions_temp
8398: WHERE transaction_header_id = p_header_id
8399: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE
8400: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
8401: WIP_CONSTANTS.CPLASSY_ACTION);
8402:
8403: l_repAssembly c_repAssembly%ROWTYPE;
8404: l_params wip_logger.param_tbl_t;
8405: l_returnStatus VARCHAR(1);

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

8420: BEGIN
8421: l_move := p_gib.move_profile;
8422:
8423: -- write parameter value to log file
8424: IF (l_logLevel <= wip_constants.trace_logging) THEN
8425: l_params(1).paramName := 'p_group_id';
8426: l_params(1).paramValue := p_gib.group_id;
8427: l_params(2).paramName := 'p_txn_date';
8428: l_params(2).paramValue := p_gib.txn_date;

Line 8493: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN

8489: FROM DUAL;
8490: END IF;
8491:
8492: /* set transaction type */
8493: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
8494: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8495: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8496: l_txn_direction := -1;
8497: ELSE

Line 8494: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;

8490: END IF;
8491:
8492: /* set transaction type */
8493: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
8494: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8495: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8496: l_txn_direction := -1;
8497: ELSE
8498: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;

Line 8495: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;

8491:
8492: /* set transaction type */
8493: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
8494: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8495: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8496: l_txn_direction := -1;
8497: ELSE
8498: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
8499: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;

Line 8498: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;

8494: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8495: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8496: l_txn_direction := -1;
8497: ELSE
8498: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
8499: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;
8500: l_txn_direction := 1;
8501: END IF;
8502:

Line 8499: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;

8495: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8496: l_txn_direction := -1;
8497: ELSE
8498: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
8499: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;
8500: l_txn_direction := 1;
8501: END IF;
8502:
8503: -- initialize transaction mode

Line 8504: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND

8500: l_txn_direction := 1;
8501: END IF;
8502:
8503: -- initialize transaction mode
8504: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8505: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8506: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8507: ELSE
8508: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

Line 8505: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN

8501: END IF;
8502:
8503: -- initialize transaction mode
8504: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8505: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8506: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8507: ELSE
8508: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8509: END IF;

Line 8506: l_transaction_mode := WIP_CONSTANTS.ONLINE;

8502:
8503: -- initialize transaction mode
8504: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8505: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8506: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8507: ELSE
8508: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8509: END IF;
8510:

Line 8508: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

8504: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8505: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8506: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8507: ELSE
8508: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8509: END IF;
8510:
8511: /*------------------------------------------------------------+
8512: | Insert completion transaction record |

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

8510:
8511: /*------------------------------------------------------------+
8512: | Insert completion transaction record |
8513: +------------------------------------------------------------*/
8514: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8515: INSERT INTO mtl_transactions_interface
8516: (last_updated_by,
8517: last_update_date,
8518: last_update_login,

Line 8603: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,

8599: wop.operation_seq_num,
8600: wmti.reason_id,
8601: -- Fixed bug 2387630
8602: DECODE(msi.revision_qty_control_code, -- revision
8603: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
8604: bom_revisions.get_item_revision_fn
8605: ('EXCLUDE_OPEN_HOLD', -- eco_status
8606: 'ALL', -- examine_type
8607: wmti.organization_id, -- org_id

Line 8617: WIP_CONSTANTS.MTI_INVENTORY, -- process_flag for WIP

8613: -1,NULL,wdj.kanban_card_id),
8614: wdj.project_id, -- source_project_id
8615: wdj.task_id, -- source_task_id
8616: l_transaction_mode, -- transaction_mode
8617: WIP_CONSTANTS.MTI_INVENTORY, -- process_flag for WIP
8618: -- 'N', -- lock_flag
8619: -- 'Y', -- posting_flag
8620: -- msi.lot_control_code, -- item_lot_control_code
8621: -- msi.serial_number_control_code,-- item_serial_control_code

Line 8627: WIP_CONSTANTS.ASSY_BATCH_SEQ,-- transaction_batch_seq

8623: -- mil.task_id, -- task_id
8624: wmti.wip_entity_id, -- source_header_id
8625: wop.operation_seq_num, -- source_line_id
8626: p_gib.assy_header_id, -- transaction_batch_id
8627: WIP_CONSTANTS.ASSY_BATCH_SEQ,-- transaction_batch_seq
8628: mtl_material_transactions_s.nextval, -- transaction_interface_id
8629: -- populate this value for EZ completion/return because
8630: -- material processor need this value to enable quality
8631: wmti.qa_collection_id

Line 8639: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8635: mtl_system_items msi,
8636: wip_discrete_jobs wdj
8637: WHERE wmti.group_id = p_gib.group_id
8638: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8639: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8640: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8641: AND wmti.transaction_type = p_txn_type
8642: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8643: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/

Line 8640: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8636: wip_discrete_jobs wdj
8637: WHERE wmti.group_id = p_gib.group_id
8638: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8639: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8640: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8641: AND wmti.transaction_type = p_txn_type
8642: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8643: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8644: AND wdj.wip_entity_id = wmti.wip_entity_id

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

8638: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8639: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8640: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8641: AND wmti.transaction_type = p_txn_type
8642: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8643: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8644: AND wdj.wip_entity_id = wmti.wip_entity_id
8645: AND wdj.organization_id = wmti.organization_id
8646: AND wop.organization_id = wmti.organization_id

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

8639: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8640: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8641: AND wmti.transaction_type = p_txn_type
8642: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8643: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8644: AND wdj.wip_entity_id = wmti.wip_entity_id
8645: AND wdj.organization_id = wmti.organization_id
8646: AND wop.organization_id = wmti.organization_id
8647: AND wop.wip_entity_id = wmti.wip_entity_id

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

8654: AND wdj.organization_id = mil.organization_id (+);
8655:
8656: END IF; -- discrete jobs
8657:
8658: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
8659:
8660: INSERT INTO mtl_transactions_interface
8661: (last_updated_by,
8662: last_update_date,

Line 8743: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,

8739: wop.operation_seq_num,
8740: wmti.reason_id,
8741: -- Fixed bug 2387630
8742: DECODE(msi.revision_qty_control_code, -- revision
8743: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
8744: bom_revisions.get_item_revision_fn
8745: ('EXCLUDE_OPEN_HOLD', -- eco_status
8746: 'ALL', -- examine_type
8747: wmti.organization_id, -- org_id

Line 8753: WIP_CONSTANTS.MTI_INVENTORY, -- process_flag for WIP

8749: wmti.transaction_date -- rev_date
8750: )),
8751: NULL),
8752: l_transaction_mode, -- transaction_mode
8753: WIP_CONSTANTS.MTI_INVENTORY, -- process_flag for WIP
8754: -- 'N', -- lock_flag
8755: -- 'Y', -- posting_flag
8756: -- msi.lot_control_code, -- item_lot_control_code
8757: -- msi.serial_number_control_code, -- item_serial_control_code

Line 8761: WIP_CONSTANTS.ASSY_BATCH_SEQ, -- transaction_batch_seq

8757: -- msi.serial_number_control_code, -- item_serial_control_code
8758: wmti.wip_entity_id, -- source_header_id
8759: wop.operation_seq_num, -- source_line_id
8760: p_gib.assy_header_id, -- transaction_batch_id
8761: WIP_CONSTANTS.ASSY_BATCH_SEQ, -- transaction_batch_seq
8762: mtl_material_transactions_s.nextval, -- transaction_interface_id
8763: -- populate this value for EZ completion/return because
8764: -- material processor need this value to enable quality
8765: wmti.qa_collection_id

Line 8773: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8769: wip_repetitive_schedules wrs,
8770: wip_repetitive_items wri
8771: WHERE wmti.group_id = p_gib.group_id
8772: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8773: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8774: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8775: AND wmti.transaction_type = p_txn_type
8776: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8777: AND wrs.wip_entity_id = wmti.wip_entity_id

Line 8774: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8770: wip_repetitive_items wri
8771: WHERE wmti.group_id = p_gib.group_id
8772: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8773: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8774: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8775: AND wmti.transaction_type = p_txn_type
8776: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8777: AND wrs.wip_entity_id = wmti.wip_entity_id
8778: AND wrs.organization_id = wmti.organization_id

Line 8776: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

8772: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8773: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8774: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8775: AND wmti.transaction_type = p_txn_type
8776: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8777: AND wrs.wip_entity_id = wmti.wip_entity_id
8778: AND wrs.organization_id = wmti.organization_id
8779: AND wrs.line_id = wmti.line_id
8780: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id

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

8790: AND msi.inventory_item_id = wmti.primary_item_id;
8791: END IF; -- Repetitive schedules
8792:
8793: -- IF debug message level = 2, write statement below to log file
8794: IF (l_logLevel <= wip_constants.full_logging) THEN
8795: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
8796: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8797: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTIONS_INTERFACE');
8798: l_msg := fnd_message.get;

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

8800: x_returnStatus => l_returnStatus);
8801: END IF;
8802:
8803: /* Only allow lot control for discrete/OSFM jobs */
8804: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8805:
8806: SELECT COUNT(*)
8807: INTO l_mti_lot_rec
8808: FROM mtl_transactions_interface mti,

Line 8816: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

8812: AND mti.transaction_header_id = p_gib.assy_header_id
8813: AND mti.transaction_action_id = l_txn_action_id
8814: AND mti.transaction_type_id = l_txn_type_id
8815: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8816: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8817: WIP_CONSTANTS.LOTBASED) /*WSM*/
8818: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
8819:
8820: -- IF debug message level = 2, write statement below to log file

Line 8817: WIP_CONSTANTS.LOTBASED) /*WSM*/

8813: AND mti.transaction_action_id = l_txn_action_id
8814: AND mti.transaction_type_id = l_txn_type_id
8815: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8816: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8817: WIP_CONSTANTS.LOTBASED) /*WSM*/
8818: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
8819:
8820: -- IF debug message level = 2, write statement below to log file
8821: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 8818: AND msi.lot_control_code = WIP_CONSTANTS.LOT;

8814: AND mti.transaction_type_id = l_txn_type_id
8815: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8816: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8817: WIP_CONSTANTS.LOTBASED) /*WSM*/
8818: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
8819:
8820: -- IF debug message level = 2, write statement below to log file
8821: IF (l_logLevel <= wip_constants.full_logging) THEN
8822: l_msg := 'No. of records in mti updated for lot controlled ' ||

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

8817: WIP_CONSTANTS.LOTBASED) /*WSM*/
8818: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
8819:
8820: -- IF debug message level = 2, write statement below to log file
8821: IF (l_logLevel <= wip_constants.full_logging) THEN
8822: l_msg := 'No. of records in mti updated for lot controlled ' ||
8823: 'assemblies : ' || l_mti_lot_rec;
8824: wip_logger.log(p_msg => l_msg,
8825: x_returnStatus => l_returnStatus);

Line 8869: WIP_CONSTANTS.FULL_SN, mtl_material_transactions_s.nextval,

8865: mti.last_update_date,
8866: mti.last_updated_by,
8867: mti.last_update_login,
8868: DECODE(msi.serial_number_control_code,
8869: WIP_CONSTANTS.FULL_SN, mtl_material_transactions_s.nextval,
8870: WIP_CONSTANTS.DYN_RCV_SN,mtl_material_transactions_s.nextval,
8871: NULL)
8872: FROM mtl_transactions_interface mti,
8873: mtl_system_items msi,

Line 8870: WIP_CONSTANTS.DYN_RCV_SN,mtl_material_transactions_s.nextval,

8866: mti.last_updated_by,
8867: mti.last_update_login,
8868: DECODE(msi.serial_number_control_code,
8869: WIP_CONSTANTS.FULL_SN, mtl_material_transactions_s.nextval,
8870: WIP_CONSTANTS.DYN_RCV_SN,mtl_material_transactions_s.nextval,
8871: NULL)
8872: FROM mtl_transactions_interface mti,
8873: mtl_system_items msi,
8874: wip_discrete_jobs wdj

Line 8881: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

8877: AND mti.transaction_header_id = p_gib.assy_header_id
8878: AND mti.transaction_action_id = l_txn_action_id
8879: AND mti.transaction_type_id = l_txn_type_id
8880: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8881: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8882: WIP_CONSTANTS.LOTBASED)/*WSM */
8883: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8884: AND mti.organization_id = wdj.organization_id
8885: AND mti.transaction_source_id = wdj.wip_entity_id

Line 8882: WIP_CONSTANTS.LOTBASED)/*WSM */

8878: AND mti.transaction_action_id = l_txn_action_id
8879: AND mti.transaction_type_id = l_txn_type_id
8880: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8881: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8882: WIP_CONSTANTS.LOTBASED)/*WSM */
8883: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8884: AND mti.organization_id = wdj.organization_id
8885: AND mti.transaction_source_id = wdj.wip_entity_id
8886: AND NOT EXISTS

Line 8883: AND msi.lot_control_code = WIP_CONSTANTS.LOT

8879: AND mti.transaction_type_id = l_txn_type_id
8880: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8881: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8882: WIP_CONSTANTS.LOTBASED)/*WSM */
8883: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8884: AND mti.organization_id = wdj.organization_id
8885: AND mti.transaction_source_id = wdj.wip_entity_id
8886: AND NOT EXISTS
8887: (SELECT 1

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

8889: WHERE mtli.transaction_interface_id =
8890: mti.transaction_interface_id);
8891:
8892: -- IF debug message level = 2, write statement below to log file
8893: IF (l_logLevel <= wip_constants.full_logging) THEN
8894: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
8895: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8896: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
8897: l_msg := fnd_message.get;

Line 8918: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

8914: AND mti.transaction_header_id = p_gib.assy_header_id
8915: AND mti.transaction_action_id = l_txn_action_id
8916: AND mti.transaction_type_id = l_txn_type_id
8917: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8918: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8919: WIP_CONSTANTS.LOTBASED)/*WSM */
8920: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8921: AND mln.lot_number = mtli.lot_number
8922: AND mln.inventory_item_id = mti.inventory_item_id

Line 8919: WIP_CONSTANTS.LOTBASED)/*WSM */

8915: AND mti.transaction_action_id = l_txn_action_id
8916: AND mti.transaction_type_id = l_txn_type_id
8917: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8918: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8919: WIP_CONSTANTS.LOTBASED)/*WSM */
8920: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8921: AND mln.lot_number = mtli.lot_number
8922: AND mln.inventory_item_id = mti.inventory_item_id
8923: AND mln.organization_id = mti.organization_id)

Line 8920: AND msi.lot_control_code = WIP_CONSTANTS.LOT

8916: AND mti.transaction_type_id = l_txn_type_id
8917: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8918: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8919: WIP_CONSTANTS.LOTBASED)/*WSM */
8920: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8921: AND mln.lot_number = mtli.lot_number
8922: AND mln.inventory_item_id = mti.inventory_item_id
8923: AND mln.organization_id = mti.organization_id)
8924: WHERE mtli.transaction_interface_id IN

Line 8934: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

8930: AND mti.transaction_header_id = p_gib.assy_header_id
8931: AND mti.transaction_action_id = l_txn_action_id
8932: AND mti.transaction_type_id = l_txn_type_id
8933: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8934: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8935: WIP_CONSTANTS.LOTBASED)/* WSM */
8936: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8937:
8938: -- IF debug message level = 2, write statement below to log file

Line 8935: WIP_CONSTANTS.LOTBASED)/* WSM */

8931: AND mti.transaction_action_id = l_txn_action_id
8932: AND mti.transaction_type_id = l_txn_type_id
8933: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8934: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8935: WIP_CONSTANTS.LOTBASED)/* WSM */
8936: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8937:
8938: -- IF debug message level = 2, write statement below to log file
8939: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 8936: AND msi.lot_control_code = WIP_CONSTANTS.LOT);

8932: AND mti.transaction_type_id = l_txn_type_id
8933: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8934: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8935: WIP_CONSTANTS.LOTBASED)/* WSM */
8936: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8937:
8938: -- IF debug message level = 2, write statement below to log file
8939: IF (l_logLevel <= wip_constants.full_logging) THEN
8940: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

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

8935: WIP_CONSTANTS.LOTBASED)/* WSM */
8936: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8937:
8938: -- IF debug message level = 2, write statement below to log file
8939: IF (l_logLevel <= wip_constants.full_logging) THEN
8940: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
8941: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8942: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
8943: l_msg := fnd_message.get;

Line 8961: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

8957: WHERE mti.transaction_header_id = p_gib.assy_header_id
8958: AND mti.transaction_action_id = l_txn_action_id
8959: AND mti.transaction_type_id = l_txn_type_id
8960: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8961: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8962: WIP_CONSTANTS.LOTBASED) /*WSM */
8963: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8964: AND msi.organization_id = mti.organization_id
8965: AND msi.inventory_item_id = mti.inventory_item_id

Line 8962: WIP_CONSTANTS.LOTBASED) /*WSM */

8958: AND mti.transaction_action_id = l_txn_action_id
8959: AND mti.transaction_type_id = l_txn_type_id
8960: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8961: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8962: WIP_CONSTANTS.LOTBASED) /*WSM */
8963: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8964: AND msi.organization_id = mti.organization_id
8965: AND msi.inventory_item_id = mti.inventory_item_id
8966: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE

Line 8963: AND msi.lot_control_code = WIP_CONSTANTS.LOT

8959: AND mti.transaction_type_id = l_txn_type_id
8960: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8961: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8962: WIP_CONSTANTS.LOTBASED) /*WSM */
8963: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8964: AND msi.organization_id = mti.organization_id
8965: AND msi.inventory_item_id = mti.inventory_item_id
8966: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE
8967: AND mtli.transaction_interface_id =

Line 8966: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE

8962: WIP_CONSTANTS.LOTBASED) /*WSM */
8963: AND msi.lot_control_code = WIP_CONSTANTS.LOT
8964: AND msi.organization_id = mti.organization_id
8965: AND msi.inventory_item_id = mti.inventory_item_id
8966: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE
8967: AND mtli.transaction_interface_id =
8968: mti.transaction_interface_id)
8969: WHERE mtli.lot_expiration_date IS NULL
8970: AND mtli.transaction_interface_id IN

Line 8980: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

8976: AND mti.transaction_header_id = p_gib.assy_header_id
8977: AND mti.transaction_action_id = l_txn_action_id
8978: AND mti.transaction_type_id = l_txn_type_id
8979: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8980: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8981: WIP_CONSTANTS.LOTBASED)/* WSM */
8982: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8983:
8984: -- IF debug message level = 2, write statement below to log file

Line 8981: WIP_CONSTANTS.LOTBASED)/* WSM */

8977: AND mti.transaction_action_id = l_txn_action_id
8978: AND mti.transaction_type_id = l_txn_type_id
8979: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8980: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8981: WIP_CONSTANTS.LOTBASED)/* WSM */
8982: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8983:
8984: -- IF debug message level = 2, write statement below to log file
8985: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 8982: AND msi.lot_control_code = WIP_CONSTANTS.LOT);

8978: AND mti.transaction_type_id = l_txn_type_id
8979: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
8980: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
8981: WIP_CONSTANTS.LOTBASED)/* WSM */
8982: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8983:
8984: -- IF debug message level = 2, write statement below to log file
8985: IF (l_logLevel <= wip_constants.full_logging) THEN
8986: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

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

8981: WIP_CONSTANTS.LOTBASED)/* WSM */
8982: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
8983:
8984: -- IF debug message level = 2, write statement below to log file
8985: IF (l_logLevel <= wip_constants.full_logging) THEN
8986: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
8987: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8988: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
8989: l_msg := fnd_message.get;

Line 9007: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9003: AND mti.transaction_header_id = p_gib.assy_header_id
9004: AND mti.transaction_action_id = l_txn_action_id
9005: AND mti.transaction_type_id = l_txn_type_id
9006: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9007: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9008: WIP_CONSTANTS.LOTBASED) /*WSM*/
9009: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9010: WIP_CONSTANTS.DYN_RCV_SN);
9011:

Line 9008: WIP_CONSTANTS.LOTBASED) /*WSM*/

9004: AND mti.transaction_action_id = l_txn_action_id
9005: AND mti.transaction_type_id = l_txn_type_id
9006: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9007: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9008: WIP_CONSTANTS.LOTBASED) /*WSM*/
9009: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9010: WIP_CONSTANTS.DYN_RCV_SN);
9011:
9012: -- IF debug message level = 2, write statement below to log file

Line 9009: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,

9005: AND mti.transaction_type_id = l_txn_type_id
9006: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9007: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9008: WIP_CONSTANTS.LOTBASED) /*WSM*/
9009: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9010: WIP_CONSTANTS.DYN_RCV_SN);
9011:
9012: -- IF debug message level = 2, write statement below to log file
9013: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 9010: WIP_CONSTANTS.DYN_RCV_SN);

9006: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9007: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9008: WIP_CONSTANTS.LOTBASED) /*WSM*/
9009: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9010: WIP_CONSTANTS.DYN_RCV_SN);
9011:
9012: -- IF debug message level = 2, write statement below to log file
9013: IF (l_logLevel <= wip_constants.full_logging) THEN
9014: l_msg := 'No. of records in mti updated for serial controlled ' ||

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

9009: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9010: WIP_CONSTANTS.DYN_RCV_SN);
9011:
9012: -- IF debug message level = 2, write statement below to log file
9013: IF (l_logLevel <= wip_constants.full_logging) THEN
9014: l_msg := 'No. of records in mti updated for serial controlled ' ||
9015: 'assemblies : ' || l_mti_ser_rec;
9016: wip_logger.log(p_msg => l_msg,
9017: x_returnStatus => l_returnStatus);

Line 9035: WIP_CONSTANTS.LOT, mtli.serial_transaction_temp_id,

9031: fm_serial_number,
9032: to_serial_number
9033: )
9034: SELECT DECODE(msi.lot_control_code,
9035: WIP_CONSTANTS.LOT, mtli.serial_transaction_temp_id,
9036: mti.transaction_interface_id),
9037: mti.creation_date,
9038: mti.created_by,
9039: mti.last_update_date,

Line 9054: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9050: AND mti.transaction_header_id = p_gib.assy_header_id
9051: AND mti.transaction_action_id = l_txn_action_id
9052: AND mti.transaction_type_id = l_txn_type_id
9053: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9054: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9055: WIP_CONSTANTS.LOTBASED)/*WSM */
9056: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9057: WIP_CONSTANTS.DYN_RCV_SN)
9058: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)

Line 9055: WIP_CONSTANTS.LOTBASED)/*WSM */

9051: AND mti.transaction_action_id = l_txn_action_id
9052: AND mti.transaction_type_id = l_txn_type_id
9053: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9054: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9055: WIP_CONSTANTS.LOTBASED)/*WSM */
9056: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9057: WIP_CONSTANTS.DYN_RCV_SN)
9058: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9059: AND mti.move_transaction_id = wsmi.transaction_id;

Line 9056: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,

9052: AND mti.transaction_type_id = l_txn_type_id
9053: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9054: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9055: WIP_CONSTANTS.LOTBASED)/*WSM */
9056: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9057: WIP_CONSTANTS.DYN_RCV_SN)
9058: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9059: AND mti.move_transaction_id = wsmi.transaction_id;
9060:

Line 9057: WIP_CONSTANTS.DYN_RCV_SN)

9053: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9054: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9055: WIP_CONSTANTS.LOTBASED)/*WSM */
9056: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9057: WIP_CONSTANTS.DYN_RCV_SN)
9058: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9059: AND mti.move_transaction_id = wsmi.transaction_id;
9060:
9061: -- IF debug message level = 2, write statement below to log file

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

9058: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9059: AND mti.move_transaction_id = wsmi.transaction_id;
9060:
9061: -- IF debug message level = 2, write statement below to log file
9062: IF (l_logLevel <= wip_constants.full_logging) THEN
9063: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
9064: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
9065: fnd_message.set_token('ENTITY2', 'MTL_SERIAL_NUMBERS_INTERFACE');
9066: l_msg := fnd_message.get;

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

9068: x_returnStatus => l_returnStatus);
9069: END IF;
9070: END IF; -- Discrete or OSFM jobs
9071:
9072: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
9073: l_addMsgToStack := fnd_api.g_true;
9074: ELSE
9075: -- Message stack is only useful for online transaction. For background,
9076: -- we never used message stack.

Line 9090: IF (l_transaction_mode <> WIP_CONSTANTS.ONLINE) THEN

9086: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9087: --FP bug 5752485 (base bug 4128207) Added the IF condition below since write_mtl_errors
9088: --is not applicable for ONLINE completions. Otherwise the fnd_msg_pub stack is initialized
9089: --inside write_mtl_errors which suppresses messages to be shown to the user in the UI
9090: IF (l_transaction_mode <> WIP_CONSTANTS.ONLINE) THEN
9091: -- write mtl error message into WIP_TXN_INTERFACE_ERRORS
9092: write_mtl_errors(p_mtl_header_id => p_gib.assy_header_id);
9093: END IF;
9094: l_errMsg := 'wip_mtlTempProc_priv.validateInterfaceTxns failed' ||

Line 9108: p_tblName => WIP_CONSTANTS.MMTT_TBL,

9104: p_cplTxnID => l_repAssembly.cpl_txn_id,
9105: p_txnActionID => l_repAssembly.txn_action_id,
9106: p_wipEntityID => l_repAssembly.txn_src_id,
9107: p_repLineID => l_repAssembly.rep_line_id,
9108: p_tblName => WIP_CONSTANTS.MMTT_TBL,
9109: p_endDebug => fnd_api.g_false,
9110: x_returnStatus => x_returnStatus);
9111:
9112: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

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

9114: raise fnd_api.g_exc_unexpected_error;
9115: END IF;
9116: END LOOP;
9117:
9118: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
9119: snapshot_online(p_mtl_header_id => p_gib.assy_header_id,
9120: p_org_id => l_move.org_id,
9121: p_txn_type => p_txn_type,
9122: p_txn_type_id => l_txn_type_id,

Line 9131: IF(p_txn_type = WIP_CONSTANTS.RET_TXN) THEN

9127: l_errMsg := 'wip_movProc_priv.snapshot_online failed';
9128: raise fnd_api.g_exc_unexpected_error;
9129: END IF; -- check return status
9130: ELSE -- move is background
9131: IF(p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
9132: snapshot_background(p_group_id => p_gib.group_id,
9133: p_txn_date => p_gib.txn_date,
9134: x_returnStatus => x_returnStatus);
9135:

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

9142:
9143: x_returnStatus := fnd_api.g_ret_sts_success;
9144:
9145: -- write to the log file
9146: IF (l_logLevel <= wip_constants.trace_logging) THEN
9147: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.ez_completion',
9148: p_procReturnStatus => x_returnStatus,
9149: p_msg => 'procedure complete',
9150: x_returnStatus => l_returnStatus);

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

9152:
9153: EXCEPTION
9154: WHEN fnd_api.g_exc_unexpected_error THEN
9155: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9156: IF (l_logLevel <= wip_constants.trace_logging) THEN
9157: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.ez_completion',
9158: p_procReturnStatus => x_returnStatus,
9159: p_msg => l_errMsg,
9160: x_returnStatus => l_returnStatus);

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

9163: WHEN others THEN
9164: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9165: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9166:
9167: IF (l_logLevel <= wip_constants.trace_logging) THEN
9168: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.ez_completion',
9169: p_procReturnStatus => x_returnStatus,
9170: p_msg => l_errMsg,
9171: x_returnStatus => l_returnStatus);

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

9189: l_errMsg VARCHAR2(240);
9190: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
9191:
9192: BEGIN
9193: IF (l_logLevel <= wip_constants.trace_logging) THEN
9194: l_params(1).paramName := 'p_group_id';
9195: l_params(1).paramValue := p_gib.group_id;
9196: l_params(2).paramName := 'p_txn_date';
9197: l_params(2).paramValue := p_gib.txn_date;

Line 9231: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_PROC

9227: WHERE wro1.rowid = wro.rowid
9228: -- The WO rows to be updated are identIFied by the rowids.
9229: -- For each such row, go back and sum the quantities from WMTI
9230: AND wmti1.group_id = p_gib.group_id
9231: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_PROC
9232: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
9233: AND TRUNC(wmti1.transaction_date) = TRUNC(p_gib.txn_date)
9234: AND wmti1.overcompletion_transaction_id IS NOT NULL
9235: AND wmti1.overcompletion_primary_qty IS NULL

Line 9232: AND wmti1.process_status = WIP_CONSTANTS.RUNNING

9228: -- The WO rows to be updated are identIFied by the rowids.
9229: -- For each such row, go back and sum the quantities from WMTI
9230: AND wmti1.group_id = p_gib.group_id
9231: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_PROC
9232: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
9233: AND TRUNC(wmti1.transaction_date) = TRUNC(p_gib.txn_date)
9234: AND wmti1.overcompletion_transaction_id IS NOT NULL
9235: AND wmti1.overcompletion_primary_qty IS NULL
9236: AND wro1.wip_entity_id = wmti1.wip_entity_id

Line 9249: AND wmti2.process_phase = WIP_CONSTANTS.MOVE_PROC

9245: FROM wip_requirement_operations wro2,
9246: wip_move_txn_interface wmti2,
9247: wip_move_txn_allocations wma2
9248: WHERE wmti2.group_id = p_gib.group_id
9249: AND wmti2.process_phase = WIP_CONSTANTS.MOVE_PROC
9250: AND wmti2.process_status = WIP_CONSTANTS.RUNNING
9251: AND TRUNC(wmti2.transaction_date) = TRUNC(p_gib.txn_date)
9252: AND wmti2.overcompletion_transaction_id IS NOT NULL
9253: AND wmti2.overcompletion_primary_qty IS NULL

Line 9250: AND wmti2.process_status = WIP_CONSTANTS.RUNNING

9246: wip_move_txn_interface wmti2,
9247: wip_move_txn_allocations wma2
9248: WHERE wmti2.group_id = p_gib.group_id
9249: AND wmti2.process_phase = WIP_CONSTANTS.MOVE_PROC
9250: AND wmti2.process_status = WIP_CONSTANTS.RUNNING
9251: AND TRUNC(wmti2.transaction_date) = TRUNC(p_gib.txn_date)
9252: AND wmti2.overcompletion_transaction_id IS NOT NULL
9253: AND wmti2.overcompletion_primary_qty IS NULL
9254: -- Picked a Move txn

Line 9261: AND nvl(wro.basis_type,1) <> WIP_CONSTANTS.LOT_BASED_MTL; /* LBM Project */

9257: AND wmti2.organization_id = wma2.organization_id (+)
9258: AND wmti2.transaction_id = wma2.transaction_id (+)
9259: AND NVL(wma2.repetitive_schedule_id,0)
9260: = NVL(wro2.repetitive_schedule_id,0))
9261: AND nvl(wro.basis_type,1) <> WIP_CONSTANTS.LOT_BASED_MTL; /* LBM Project */
9262:
9263: x_returnStatus := fnd_api.g_ret_sts_success;
9264:
9265: -- write to the log file

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

9262:
9263: x_returnStatus := fnd_api.g_ret_sts_success;
9264:
9265: -- write to the log file
9266: IF (l_logLevel <= wip_constants.trace_logging) THEN
9267: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wro',
9268: p_procReturnStatus => x_returnStatus,
9269: p_msg => 'procedure complete',
9270: x_returnStatus => l_returnStatus);

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

9274: WHEN others THEN
9275: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9276: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9277:
9278: IF (l_logLevel <= wip_constants.trace_logging) THEN
9279: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_wro',
9280: p_procReturnStatus => x_returnStatus,
9281: p_msg => l_errMsg,
9282: x_returnStatus => l_returnStatus);

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

9306:
9307: BEGIN
9308: l_move := p_gib.move_profile;
9309:
9310: IF (l_logLevel <= wip_constants.trace_logging) THEN
9311: l_params(1).paramName := 'p_group_id';
9312: l_params(1).paramValue := p_gib.group_id;
9313: l_params(2).paramName := 'p_mtl_header_id';
9314: l_params(2).paramValue := p_gib.mtl_header_id;

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

9384: raise fnd_api.g_exc_unexpected_error;
9385: END IF; -- check return status
9386:
9387: -- Call repetitive allocatioin for repetitive schedule
9388: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
9389: rep_move_alloc(p_gib => p_gib,
9390: x_returnStatus => x_returnStatus);
9391:
9392: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

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

9395: END IF; -- check return status
9396: END IF; -- check repetitive schedules
9397:
9398: -- Check for the step unit quantities for discrete and OSFM jobs
9399: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
9400: check_qty_dj(p_gib => p_gib,
9401: x_returnStatus => x_returnStatus);
9402:
9403: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

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

9447: END IF; -- check return status
9448:
9449: -- Only call the cost allocation IF schedule transactions and auto resource
9450: -- per item exist (insert into WIP_TXN_ALLOCATIONS)
9451: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
9452: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
9453:
9454: insert_txn_alloc(p_gib => p_gib,
9455: x_returnStatus => x_returnStatus);

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

9448:
9449: -- Only call the cost allocation IF schedule transactions and auto resource
9450: -- per item exist (insert into WIP_TXN_ALLOCATIONS)
9451: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
9452: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
9453:
9454: insert_txn_alloc(p_gib => p_gib,
9455: x_returnStatus => x_returnStatus);
9456:

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

9499: END IF; -- check return status
9500: END IF;
9501: END IF;
9502:
9503: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
9504: -- Only update quantity_completed if online. For background, we will update
9505: -- quantity completed in update_wo_and_snapshot
9506: update_complete_qty(p_gib => p_gib,
9507: x_returnStatus => x_returnStatus);

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

9533:
9534: x_returnStatus := fnd_api.g_ret_sts_success;
9535:
9536: -- write to the log file
9537: IF (l_logLevel <= wip_constants.trace_logging) THEN
9538: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.move_txns',
9539: p_procReturnStatus => x_returnStatus,
9540: p_msg => 'procedure complete',
9541: x_returnStatus => l_returnStatus);

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

9543:
9544: EXCEPTION
9545: WHEN fnd_api.g_exc_unexpected_error THEN
9546: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9547: IF (l_logLevel <= wip_constants.trace_logging) THEN
9548: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.move_txns',
9549: p_procReturnStatus => x_returnStatus,
9550: p_msg => l_errMsg,
9551: x_returnStatus => l_returnStatus);

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

9554: WHEN others THEN
9555: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9556: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9557:
9558: IF (l_logLevel <= wip_constants.trace_logging) THEN
9559: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.move_txns',
9560: p_procReturnStatus => x_returnStatus,
9561: p_msg => l_errMsg,
9562: x_returnStatus => l_returnStatus);

Line 9614: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP

9610: wmti.reference reference
9611: FROM wip_move_txn_interface wmti
9612: WHERE wmti.group_id = p_group_id
9613: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
9614: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
9615: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
9616:
9617: CURSOR c_move_online IS
9618: SELECT NVL(last_updated_by, -1) user_id,

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

9611: FROM wip_move_txn_interface wmti
9612: WHERE wmti.group_id = p_group_id
9613: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
9614: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
9615: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
9616:
9617: CURSOR c_move_online IS
9618: SELECT NVL(last_updated_by, -1) user_id,
9619: NVL(last_update_login, -1) login_id,

Line 9636: -- AND process_phase = WIP_CONSTANTS.MOVE_PROC

9632: to_intraoperation_step_type to_step
9633: FROM wip_move_txn_interface
9634: WHERE group_id = p_group_id
9635: /* Comment out the check below because UI may need to use validation logic */
9636: -- AND process_phase = WIP_CONSTANTS.MOVE_PROC
9637: AND process_status = WIP_CONSTANTS.RUNNING;
9638:
9639: CURSOR c_qa_id(p_txn_date DATE) IS
9640: SELECT qa_collection_id

Line 9637: AND process_status = WIP_CONSTANTS.RUNNING;

9633: FROM wip_move_txn_interface
9634: WHERE group_id = p_group_id
9635: /* Comment out the check below because UI may need to use validation logic */
9636: -- AND process_phase = WIP_CONSTANTS.MOVE_PROC
9637: AND process_status = WIP_CONSTANTS.RUNNING;
9638:
9639: CURSOR c_qa_id(p_txn_date DATE) IS
9640: SELECT qa_collection_id
9641: FROM wip_move_txn_interface

Line 9643: AND process_phase = WIP_CONSTANTS.MOVE_PROC

9639: CURSOR c_qa_id(p_txn_date DATE) IS
9640: SELECT qa_collection_id
9641: FROM wip_move_txn_interface
9642: WHERE group_id = p_group_id
9643: AND process_phase = WIP_CONSTANTS.MOVE_PROC
9644: AND process_status = WIP_CONSTANTS.RUNNING
9645: AND TRUNC(transaction_date)= TRUNC(p_txn_date)
9646: -- Only enable QA for move, scrap and reject. For EZ completion/return,
9647: -- material processor will call it.

Line 9644: AND process_status = WIP_CONSTANTS.RUNNING

9640: SELECT qa_collection_id
9641: FROM wip_move_txn_interface
9642: WHERE group_id = p_group_id
9643: AND process_phase = WIP_CONSTANTS.MOVE_PROC
9644: AND process_status = WIP_CONSTANTS.RUNNING
9645: AND TRUNC(transaction_date)= TRUNC(p_txn_date)
9646: -- Only enable QA for move, scrap and reject. For EZ completion/return,
9647: -- material processor will call it.
9648: AND transaction_type = WIP_CONSTANTS.MOVE_TXN

Line 9648: AND transaction_type = WIP_CONSTANTS.MOVE_TXN

9644: AND process_status = WIP_CONSTANTS.RUNNING
9645: AND TRUNC(transaction_date)= TRUNC(p_txn_date)
9646: -- Only enable QA for move, scrap and reject. For EZ completion/return,
9647: -- material processor will call it.
9648: AND transaction_type = WIP_CONSTANTS.MOVE_TXN
9649: AND qa_collection_id IS NOT NULL;
9650:
9651: CURSOR c_txn_date IS
9652: SELECT DISTINCT TRUNC(transaction_date)

Line 9655: AND process_status = WIP_CONSTANTS.RUNNING;

9651: CURSOR c_txn_date IS
9652: SELECT DISTINCT TRUNC(transaction_date)
9653: FROM wip_move_txn_interface
9654: WHERE group_id = p_group_id
9655: AND process_status = WIP_CONSTANTS.RUNNING;
9656:
9657: l_gib group_rec_t;
9658: l_move_online c_move_online%ROWTYPE;
9659: l_backflush c_backflush%ROWTYPE;

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

9689: IF(fnd_api.to_boolean(p_initMsgList)) THEN
9690: fnd_msg_pub.initialize;
9691: END IF;
9692:
9693: IF (l_logLevel <= wip_constants.trace_logging) THEN
9694: l_params(1).paramName := 'p_group_id';
9695: l_params(1).paramValue := p_group_id;
9696: l_params(2).paramName := 'p_child_txn_id';
9697: l_params(2).paramValue := p_child_txn_id;

Line 9728: IF(p_move_mode = WIP_CONSTANTS.ONLINE) THEN

9724: p_params => l_params,
9725: x_returnStatus => l_returnStatus);
9726: END IF;
9727:
9728: IF(p_move_mode = WIP_CONSTANTS.ONLINE) THEN
9729:
9730: -- this cursor suppose to return only one record because transaction_id
9731: -- is primary_key
9732: FOR l_move_online IN c_move_online LOOP

Line 9745: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN

9741: l_gib.move_profile.fmStep := l_move_online.fm_step;
9742: l_gib.move_profile.toOp := l_move_online.to_op;
9743: l_gib.move_profile.toStep := l_move_online.to_step;
9744:
9745: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN
9746: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;
9747: ELSE
9748: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
9749: END IF;

Line 9746: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;

9742: l_gib.move_profile.toOp := l_move_online.to_op;
9743: l_gib.move_profile.toStep := l_move_online.to_step;
9744:
9745: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN
9746: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;
9747: ELSE
9748: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
9749: END IF;
9750:

Line 9748: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;

9744:
9745: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN
9746: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;
9747: ELSE
9748: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
9749: END IF;
9750:
9751: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
9752: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;

Line 9751: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN

9747: ELSE
9748: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
9749: END IF;
9750:
9751: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
9752: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;
9753: ELSE
9754: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
9755: END IF;

Line 9752: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;

9748: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
9749: END IF;
9750:
9751: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
9752: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;
9753: ELSE
9754: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
9755: END IF;
9756:

Line 9754: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;

9750:
9751: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
9752: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;
9753: ELSE
9754: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
9755: END IF;
9756:
9757: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
9758: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN

Line 9757: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR

9753: ELSE
9754: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
9755: END IF;
9756:
9757: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
9758: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
9759: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9760: ELSE
9761: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

Line 9758: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN

9754: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
9755: END IF;
9756:
9757: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
9758: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
9759: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9760: ELSE
9761: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9762: END IF;

Line 9759: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

9755: END IF;
9756:
9757: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
9758: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
9759: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9760: ELSE
9761: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9762: END IF;
9763:

Line 9761: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

9757: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
9758: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
9759: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9760: ELSE
9761: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9762: END IF;
9763:
9764: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
9765: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

Line 9764: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN

9760: ELSE
9761: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9762: END IF;
9763:
9764: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
9765: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9766: ELSE
9767: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9768: END IF;

Line 9765: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

9761: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9762: END IF;
9763:
9764: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
9765: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9766: ELSE
9767: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9768: END IF;
9769: -- the others 4 parameters will be initialized in get_move_profile()

Line 9767: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;

9763:
9764: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
9765: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9766: ELSE
9767: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9768: END IF;
9769: -- the others 4 parameters will be initialized in get_move_profile()
9770: -- rsrcItem, rsrcLot, poReqItem, poReqLot
9771:

Line 9776: l_gib.move_mode := WIP_CONSTANTS.ONLINE;

9772: -- initialize value for l_gib
9773: l_gib.group_id := p_group_id;
9774: l_gib.assy_header_id := p_assy_header_id;
9775: l_gib.mtl_header_id := p_mtl_header_id;
9776: l_gib.move_mode := WIP_CONSTANTS.ONLINE;
9777: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
9778: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
9779: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;
9780: l_gib.process_status := WIP_CONSTANTS.RUNNING;

Line 9779: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;

9775: l_gib.mtl_header_id := p_mtl_header_id;
9776: l_gib.move_mode := WIP_CONSTANTS.ONLINE;
9777: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
9778: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
9779: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;
9780: l_gib.process_status := WIP_CONSTANTS.RUNNING;
9781: l_gib.time_out := p_time_out;
9782: l_gib.intf_tbl_name := 'WIP_MOVE_TXN_INTERFACE';
9783: l_gib.user_id := l_move_online.user_id;

Line 9780: l_gib.process_status := WIP_CONSTANTS.RUNNING;

9776: l_gib.move_mode := WIP_CONSTANTS.ONLINE;
9777: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
9778: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
9779: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;
9780: l_gib.process_status := WIP_CONSTANTS.RUNNING;
9781: l_gib.time_out := p_time_out;
9782: l_gib.intf_tbl_name := 'WIP_MOVE_TXN_INTERFACE';
9783: l_gib.user_id := l_move_online.user_id;
9784: l_gib.login_id := l_move_online.login_id;

Line 9788: l_gib.seq_move := WIP_CONSTANTS.NO;

9784: l_gib.login_id := l_move_online.login_id;
9785: l_gib.request_id := l_move_online.req_id;
9786: l_gib.application_id := l_move_online.appl_id;
9787: l_gib.program_id := l_move_online.prog_id;
9788: l_gib.seq_move := WIP_CONSTANTS.NO;
9789: END LOOP; -- c_move_online
9790: ELSE -- move mode is background
9791: l_gib.group_id := p_group_id;
9792: l_gib.assy_header_id := p_assy_header_id;

Line 9794: l_gib.move_mode := WIP_CONSTANTS.BACKGROUND;

9790: ELSE -- move mode is background
9791: l_gib.group_id := p_group_id;
9792: l_gib.assy_header_id := p_assy_header_id;
9793: l_gib.mtl_header_id := p_mtl_header_id;
9794: l_gib.move_mode := WIP_CONSTANTS.BACKGROUND;
9795: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
9796: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
9797: l_gib.process_phase := p_proc_phase;
9798: l_gib.process_status := WIP_CONSTANTS.RUNNING;

Line 9798: l_gib.process_status := WIP_CONSTANTS.RUNNING;

9794: l_gib.move_mode := WIP_CONSTANTS.BACKGROUND;
9795: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
9796: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
9797: l_gib.process_phase := p_proc_phase;
9798: l_gib.process_status := WIP_CONSTANTS.RUNNING;
9799: l_gib.time_out := p_time_out;
9800: l_gib.intf_tbl_name := 'WIP_MOVE_TXN_INTERFACE';
9801: l_gib.user_id := fnd_global.user_id;
9802: l_gib.login_id := fnd_global.conc_login_id;

Line 9806: l_gib.seq_move := NVL(p_seq_move, WIP_CONSTANTS.NO);

9802: l_gib.login_id := fnd_global.conc_login_id;
9803: l_gib.request_id := fnd_global.conc_request_id;
9804: l_gib.application_id := fnd_global.prog_appl_id;
9805: l_gib.program_id := fnd_global.conc_program_id;
9806: l_gib.seq_move := NVL(p_seq_move, WIP_CONSTANTS.NO);
9807: END IF; -- move is online
9808:
9809: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL) THEN
9810: /*----------------+

Line 9809: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL) THEN

9805: l_gib.program_id := fnd_global.conc_program_id;
9806: l_gib.seq_move := NVL(p_seq_move, WIP_CONSTANTS.NO);
9807: END IF; -- move is online
9808:
9809: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL) THEN
9810: /*----------------+
9811: | Move Validation |
9812: +-----------------*/
9813: -- derive and validate all necessary info

Line 9820: -- WIP_CONSTANTS.ERROR, and those error records will not be picked up by

9816:
9817: -- There is no return status from this routine. IF some record error out,
9818: -- just neglect it and continue validating other records. The error record
9819: -- will have process_status in WIP_MOVE_TXN_INTERFACE equal to (3) or
9820: -- WIP_CONSTANTS.ERROR, and those error records will not be picked up by
9821: -- move_txns. The error message also show up in WIP_TXN_INTERFACE_ERRORS
9822: END IF; -- Move Validation
9823:
9824: OPEN c_txn_date;

Line 9830: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR

9826: BEGIN
9827: FETCH c_txn_date INTO l_gib.txn_date;
9828: EXIT WHEN c_txn_date%NOTFOUND;
9829: SAVEPOINT s_move_proc;
9830: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
9831: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN
9832:
9833: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
9834:

Line 9831: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN

9827: FETCH c_txn_date INTO l_gib.txn_date;
9828: EXIT WHEN c_txn_date%NOTFOUND;
9829: SAVEPOINT s_move_proc;
9830: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
9831: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN
9832:
9833: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
9834:
9835: SELECT SUM(DECODE(entity_type,

Line 9833: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

9829: SAVEPOINT s_move_proc;
9830: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
9831: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN
9832:
9833: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
9834:
9835: SELECT SUM(DECODE(entity_type,
9836: WIP_CONSTANTS.DISCRETE, 1,
9837: WIP_CONSTANTS.LOTBASED, 1,

Line 9836: WIP_CONSTANTS.DISCRETE, 1,

9832:
9833: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
9834:
9835: SELECT SUM(DECODE(entity_type,
9836: WIP_CONSTANTS.DISCRETE, 1,
9837: WIP_CONSTANTS.LOTBASED, 1,
9838: 0)),
9839: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))
9840: INTO l_job,

Line 9837: WIP_CONSTANTS.LOTBASED, 1,

9833: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
9834:
9835: SELECT SUM(DECODE(entity_type,
9836: WIP_CONSTANTS.DISCRETE, 1,
9837: WIP_CONSTANTS.LOTBASED, 1,
9838: 0)),
9839: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))
9840: INTO l_job,
9841: l_sche

Line 9839: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))

9835: SELECT SUM(DECODE(entity_type,
9836: WIP_CONSTANTS.DISCRETE, 1,
9837: WIP_CONSTANTS.LOTBASED, 1,
9838: 0)),
9839: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))
9840: INTO l_job,
9841: l_sche
9842: FROM wip_move_txn_interface wmti
9843: WHERE wmti.group_id = l_gib.group_id

Line 9845: AND process_phase = WIP_CONSTANTS.MOVE_PROC

9841: l_sche
9842: FROM wip_move_txn_interface wmti
9843: WHERE wmti.group_id = l_gib.group_id
9844: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date)
9845: AND process_phase = WIP_CONSTANTS.MOVE_PROC
9846: AND process_status = WIP_CONSTANTS.RUNNING;
9847:
9848: IF(l_job > 0 AND l_sche > 0) THEN
9849: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

Line 9846: AND process_status = WIP_CONSTANTS.RUNNING;

9842: FROM wip_move_txn_interface wmti
9843: WHERE wmti.group_id = l_gib.group_id
9844: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date)
9845: AND process_phase = WIP_CONSTANTS.MOVE_PROC
9846: AND process_status = WIP_CONSTANTS.RUNNING;
9847:
9848: IF(l_job > 0 AND l_sche > 0) THEN
9849: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9850: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

Line 9849: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

9845: AND process_phase = WIP_CONSTANTS.MOVE_PROC
9846: AND process_status = WIP_CONSTANTS.RUNNING;
9847:
9848: IF(l_job > 0 AND l_sche > 0) THEN
9849: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9850: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9851: ELSIF(l_job > 0) THEN
9852: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

Line 9850: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

9846: AND process_status = WIP_CONSTANTS.RUNNING;
9847:
9848: IF(l_job > 0 AND l_sche > 0) THEN
9849: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9850: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9851: ELSIF(l_job > 0) THEN
9852: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;

Line 9852: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;

9848: IF(l_job > 0 AND l_sche > 0) THEN
9849: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9850: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9851: ELSIF(l_job > 0) THEN
9852: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9855: ELSIF(l_sche > 0) THEN
9856: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;

Line 9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

9849: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9850: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9851: ELSIF(l_job > 0) THEN
9852: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9855: ELSIF(l_sche > 0) THEN
9856: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
9857: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

Line 9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;

9850: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9851: ELSIF(l_job > 0) THEN
9852: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9855: ELSIF(l_sche > 0) THEN
9856: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
9857: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9858: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

Line 9856: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;

9852: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9855: ELSIF(l_sche > 0) THEN
9856: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
9857: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9858: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9859: END IF; -- move profile check
9860: -- the others 6 parameters will be initialized in get_move_profile()

Line 9857: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

9853: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9855: ELSIF(l_sche > 0) THEN
9856: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
9857: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9858: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9859: END IF; -- move profile check
9860: -- the others 6 parameters will be initialized in get_move_profile()
9861: -- rsrcItem, rsrcLot, poReqItem, poReqLot, easyComplete, easyReturn

Line 9858: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

9854: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
9855: ELSIF(l_sche > 0) THEN
9856: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
9857: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
9858: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
9859: END IF; -- move profile check
9860: -- the others 6 parameters will be initialized in get_move_profile()
9861: -- rsrcItem, rsrcLot, poReqItem, poReqLot, easyComplete, easyReturn
9862: END IF; -- Background transactions

Line 9874: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN

9870: raise fnd_api.g_exc_unexpected_error;
9871: END IF; -- check return status
9872:
9873: -- check IF easy return txns
9874: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN
9875: IF(p_insertAssy = fnd_api.g_true) THEN
9876: ez_completion(p_gib => l_gib,
9877: p_txn_type => WIP_CONSTANTS.RET_TXN,
9878: x_returnStatus => x_returnStatus);

Line 9877: p_txn_type => WIP_CONSTANTS.RET_TXN,

9873: -- check IF easy return txns
9874: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN
9875: IF(p_insertAssy = fnd_api.g_true) THEN
9876: ez_completion(p_gib => l_gib,
9877: p_txn_type => WIP_CONSTANTS.RET_TXN,
9878: x_returnStatus => x_returnStatus);
9879:
9880: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9881: l_errMsg := 'wip_movProc_priv.ez_completion (return) failed';

Line 9889: p_txn_type => WIP_CONSTANTS.RET_TXN,

9885: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot
9886: for assembly return transaction.*/
9887: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9888: p_org_id => l_gib.move_profile.org_id,
9889: p_txn_type => WIP_CONSTANTS.RET_TXN,
9890: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,
9891: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,
9892: x_returnStatus => x_returnStatus);
9893:

Line 9890: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,

9886: for assembly return transaction.*/
9887: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9888: p_org_id => l_gib.move_profile.org_id,
9889: p_txn_type => WIP_CONSTANTS.RET_TXN,
9890: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,
9891: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,
9892: x_returnStatus => x_returnStatus);
9893:
9894: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 9891: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,

9887: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9888: p_org_id => l_gib.move_profile.org_id,
9889: p_txn_type => WIP_CONSTANTS.RET_TXN,
9890: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,
9891: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,
9892: x_returnStatus => x_returnStatus);
9893:
9894: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9895: l_errMsg := 'wip_movProc_priv.snapshot_online (return) failed';

Line 9907: p_txnMode => WIP_CONSTANTS.ONLINE,

9903: -- Process assembly return record
9904: wip_mtlTempProc_priv.processTemp
9905: (p_initMsgList => fnd_api.g_true,
9906: p_txnHdrID => l_gib.assy_header_id,
9907: p_txnMode => WIP_CONSTANTS.ONLINE,
9908: x_returnStatus => x_returnStatus,
9909: x_errorMsg => l_errMsg);
9910:
9911: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 9937: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN

9933: raise fnd_api.g_exc_unexpected_error;
9934: END IF; -- check return status
9935:
9936: -- check IF easy completion txns
9937: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN
9938: IF( p_insertAssy = fnd_api.g_true) THEN
9939: ez_completion(p_gib => l_gib,
9940: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9941: x_returnStatus => x_returnStatus);

Line 9940: p_txn_type => WIP_CONSTANTS.COMP_TXN,

9936: -- check IF easy completion txns
9937: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN
9938: IF( p_insertAssy = fnd_api.g_true) THEN
9939: ez_completion(p_gib => l_gib,
9940: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9941: x_returnStatus => x_returnStatus);
9942:
9943: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9944: l_errMsg := 'wip_movProc_priv.ez_completion (complete) failed';

Line 9951: p_txn_type => WIP_CONSTANTS.COMP_TXN,

9947: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are
9948: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot for assembly completion transaction.*/
9949: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9950: p_org_id => l_gib.move_profile.org_id,
9951: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9952: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,
9953: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
9954: x_returnStatus => x_returnStatus);
9955:

Line 9952: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,

9948: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot for assembly completion transaction.*/
9949: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9950: p_org_id => l_gib.move_profile.org_id,
9951: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9952: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,
9953: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
9954: x_returnStatus => x_returnStatus);
9955:
9956: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 9953: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,

9949: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9950: p_org_id => l_gib.move_profile.org_id,
9951: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9952: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,
9953: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
9954: x_returnStatus => x_returnStatus);
9955:
9956: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9957: l_errMsg := 'wip_movProc_priv.snapshot_online(complete) failed';

Line 9966: IF(l_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN

9962: END IF; -- easy complete txn
9963:
9964: -- update completed quantity and take snapshot before calling inventory
9965: -- to process aseembly completion record
9966: IF(l_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
9967: update_wo_and_snapshot(p_gib => l_gib,
9968: x_returnStatus => x_returnStatus);
9969: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9970: l_errMsg := 'wip_movProc_priv.update_wo_and_snapshot';

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

9998: END LOOP; -- c_qa_id FETCH
9999:
10000: CLOSE c_qa_id; /* Bug 4204892 - Close the cursor c_qa_id to avoid ORA-6511. */
10001:
10002: IF (l_logLevel <= wip_constants.full_logging) THEN
10003: wip_logger.log(p_msg => 'QA enable success',
10004: x_returnStatus => l_returnStatus);
10005: END IF;
10006:

Line 10008: SET process_phase = WIP_CONSTANTS.BF_SETUP

10004: x_returnStatus => l_returnStatus);
10005: END IF;
10006:
10007: UPDATE wip_move_txn_interface
10008: SET process_phase = WIP_CONSTANTS.BF_SETUP
10009: WHERE group_id = p_group_id
10010: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10011: AND process_status = WIP_CONSTANTS.RUNNING
10012: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);

Line 10010: AND process_phase = WIP_CONSTANTS.MOVE_PROC

10006:
10007: UPDATE wip_move_txn_interface
10008: SET process_phase = WIP_CONSTANTS.BF_SETUP
10009: WHERE group_id = p_group_id
10010: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10011: AND process_status = WIP_CONSTANTS.RUNNING
10012: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);
10013:
10014: -- IF debug message level = 2, write statement below to log file

Line 10011: AND process_status = WIP_CONSTANTS.RUNNING

10007: UPDATE wip_move_txn_interface
10008: SET process_phase = WIP_CONSTANTS.BF_SETUP
10009: WHERE group_id = p_group_id
10010: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10011: AND process_status = WIP_CONSTANTS.RUNNING
10012: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);
10013:
10014: -- IF debug message level = 2, write statement below to log file
10015: IF (l_logLevel <= wip_constants.full_logging) THEN

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

10011: AND process_status = WIP_CONSTANTS.RUNNING
10012: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);
10013:
10014: -- IF debug message level = 2, write statement below to log file
10015: IF (l_logLevel <= wip_constants.full_logging) THEN
10016: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
10017: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
10018: fnd_message.set_token('ENTITY2', 'WIP_MOVE_TXN_INTERFACE');
10019: l_msg := fnd_message.get;

Line 10024: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

10020: wip_logger.log(p_msg => l_msg,
10021: x_returnStatus => l_returnStatus);
10022: END IF;
10023:
10024: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN
10025: IF(l_gib.assy_header_id IS NOT NULL AND
10026: l_gib.assy_header_id <> -1) THEN
10027: -- Update lock_flag to 'Y' to prevent inventory worker pick up these
10028: -- records. After we commit, assembly completion record will be in

Line 10054: p_txnMode => WIP_CONSTANTS.ONLINE,

10050: -- Process assembly completion record
10051: wip_mtlTempProc_priv.processTemp
10052: (p_initMsgList => fnd_api.g_true,
10053: p_txnHdrID => l_gib.assy_header_id,
10054: p_txnMode => WIP_CONSTANTS.ONLINE,
10055: x_returnStatus => x_returnStatus,
10056: x_errorMsg => l_errMsg);
10057:
10058: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 10067: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

10063: raise fnd_api.g_exc_unexpected_error;
10064: END IF;
10065: END IF; -- check l_gib.assy_header_id
10066:
10067: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN
10068: -- Fixed bug 4361566. Commit to prevent dead lock from calling
10069: -- inventory TM mulitple times in the same commit cycle.
10070: COMMIT;
10071: IF(l_gib.assy_header_id IS NOT NULL AND

Line 10084: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR

10080:
10081: END IF; -- Move Processing
10082:
10083: /* Backflush processing */
10084: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10085: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10086: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10087:
10088: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN

Line 10085: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR

10081: END IF; -- Move Processing
10082:
10083: /* Backflush processing */
10084: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10085: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10086: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10087:
10088: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN
10089: IF(p_do_backflush = fnd_api.g_true) THEN

Line 10086: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN

10082:
10083: /* Backflush processing */
10084: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10085: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10086: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10087:
10088: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN
10089: IF(p_do_backflush = fnd_api.g_true) THEN
10090: IF(l_gib.mtl_header_id IS NULL OR

Line 10088: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN

10084: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10085: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10086: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10087:
10088: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN
10089: IF(p_do_backflush = fnd_api.g_true) THEN
10090: IF(l_gib.mtl_header_id IS NULL OR
10091: l_gib.mtl_header_id = -1) THEN
10092: SELECT mtl_material_transactions_s.nextval

Line 10112: IF(l_backflush.ent_type = WIP_CONSTANTS.LOTBASED) THEN

10108: p_move_txn_id => l_backflush.txn_id,
10109: p_entity_type => l_backflush.ent_type);
10110: /* End changes for bug 4916939 */
10111: -- Call OSFM new backflush API for OSFM job.
10112: IF(l_backflush.ent_type = WIP_CONSTANTS.LOTBASED) THEN
10113: wsm_serial_support_grp.backflush_comp(
10114: p_wipEntityID => l_backflush.wip_id,
10115: p_orgID => l_backflush.org_id,
10116: p_primaryQty => l_backflush.primary_qty,

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

10134: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10135: l_errMsg := 'wsm_serial_support_grp.backflush_comp failed' ;
10136: raise fnd_api.g_exc_unexpected_error;
10137: ELSE
10138: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
10139: -- If we need to gather more lot/serial, error out because
10140: -- we cannot gather lot/serial for background transaction.
10141: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
10142: fnd_msg_pub.add;

Line 10158: p_tblName => WIP_CONSTANTS.MTI_TBL,

10154: -- inventory to fail only components related to a specific move record.
10155: p_batchID => l_backflush.txn_id,
10156: p_txnType => l_backflush.txn_type,
10157: p_entityType => l_backflush.ent_type,
10158: p_tblName => WIP_CONSTANTS.MTI_TBL,
10159: p_lineID => l_backflush.line_id,
10160: p_fmOp => l_backflush.fm_op,
10161: p_fmStep => l_backflush.fm_step,
10162: p_toOp => l_backflush.to_op,

Line 10165: p_fmMoveProcessor => WIP_CONSTANTS.YES,

10161: p_fmStep => l_backflush.fm_step,
10162: p_toOp => l_backflush.to_op,
10163: p_toStep => l_backflush.to_step,
10164: p_movTxnID => l_backflush.txn_id,
10165: p_fmMoveProcessor => WIP_CONSTANTS.YES,
10166: p_mtlTxnMode => l_gib.mtl_mode,
10167: p_reasonID => l_backflush.reason_id,
10168: p_reference => l_backflush.reference,
10169: x_lotSerRequired => l_ls_required,

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

10173: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10174: l_errMsg := 'wip_bflProc_priv.backflush failed' ;
10175: raise fnd_api.g_exc_unexpected_error;
10176: ELSE
10177: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
10178: -- If we need to gather more lot/serial, error out because
10179: -- we cannot gather lot/serial for background transaction.
10180: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
10181: fnd_msg_pub.add;

Line 10196: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10192: -- insert null into WIP_TXN_INTERFACE_ERRORS
10193: fnd_message.set_name('WIP', 'WIP_SOME_RECORDS_ERROR');
10194: l_errMsg := fnd_message.get;
10195: END IF;
10196: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10197: /* Update process status to error */
10198: UPDATE wip_move_txn_interface
10199: SET process_status = WIP_CONSTANTS.ERROR
10200: WHERE group_id = p_group_id

Line 10199: SET process_status = WIP_CONSTANTS.ERROR

10195: END IF;
10196: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10197: /* Update process status to error */
10198: UPDATE wip_move_txn_interface
10199: SET process_status = WIP_CONSTANTS.ERROR
10200: WHERE group_id = p_group_id
10201: AND process_status = WIP_CONSTANTS.RUNNING
10202: AND transaction_id = l_backflush.txn_id;
10203:

Line 10201: AND process_status = WIP_CONSTANTS.RUNNING

10197: /* Update process status to error */
10198: UPDATE wip_move_txn_interface
10199: SET process_status = WIP_CONSTANTS.ERROR
10200: WHERE group_id = p_group_id
10201: AND process_status = WIP_CONSTANTS.RUNNING
10202: AND transaction_id = l_backflush.txn_id;
10203:
10204: /* insert error messages */
10205: INSERT INTO wip_txn_interface_errors

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

10236: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
10237: -- let the user know that more lot/serial info required
10238: x_returnStatus := fnd_api.g_ret_sts_error;
10239: END IF;
10240: IF (l_logLevel <= wip_constants.trace_logging) THEN
10241: l_errMsg := 'move_txn_id: ' || l_backflush.txn_id ||
10242: ' failed because ' || l_errMsg;
10243: wip_logger.log(p_msg => l_errMsg,
10244: x_returnStatus => l_returnStatus);

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

10262:
10263: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10264: -- write error into WIP_TXN_INTERFACE_ERRORS
10265: write_mtl_errors(p_mtl_header_id => l_gib.mtl_header_id);
10266: IF (l_logLevel <= wip_constants.full_logging) THEN
10267: l_errMsg := 'wip_mtlTempProc_priv.validateInterfaceTxns failed'||
10268: ' (component records)' ;
10269: wip_logger.log(p_msg => l_errMsg,
10270: x_returnStatus => l_returnStatus);

Line 10292: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN

10288: FROM mtl_material_transactions_temp
10289: WHERE transaction_header_id = l_gib.mtl_header_id;
10290:
10291: IF(l_MMTT_record > 0 AND
10292: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN
10293: -- Call material processor to process backflush components, and
10294: -- scrap assembly.
10295: wip_mtlTempProc_priv.processTemp
10296: (p_initMsgList => fnd_api.g_true,

Line 10313: process_phase = WIP_CONSTANTS.BF_SETUP,

10309: END IF; -- there is the records in MMTT with this header_id
10310: ELSE -- backflush is background
10311: UPDATE wip_move_txn_interface
10312: SET group_id = NULL,
10313: process_phase = WIP_CONSTANTS.BF_SETUP,
10314: process_status = WIP_CONSTANTS.PENDING
10315: WHERE group_id = p_group_id
10316: AND process_status = WIP_CONSTANTS.RUNNING;
10317: END IF; -- backflush is online

Line 10314: process_status = WIP_CONSTANTS.PENDING

10310: ELSE -- backflush is background
10311: UPDATE wip_move_txn_interface
10312: SET group_id = NULL,
10313: process_phase = WIP_CONSTANTS.BF_SETUP,
10314: process_status = WIP_CONSTANTS.PENDING
10315: WHERE group_id = p_group_id
10316: AND process_status = WIP_CONSTANTS.RUNNING;
10317: END IF; -- backflush is online
10318: END IF; -- Backflush Setup

Line 10316: AND process_status = WIP_CONSTANTS.RUNNING;

10312: SET group_id = NULL,
10313: process_phase = WIP_CONSTANTS.BF_SETUP,
10314: process_status = WIP_CONSTANTS.PENDING
10315: WHERE group_id = p_group_id
10316: AND process_status = WIP_CONSTANTS.RUNNING;
10317: END IF; -- backflush is online
10318: END IF; -- Backflush Setup
10319:
10320: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

Line 10320: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

10316: AND process_status = WIP_CONSTANTS.RUNNING;
10317: END IF; -- backflush is online
10318: END IF; -- Backflush Setup
10319:
10320: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN
10321: -- Fixed bug 4361566. Commit to prevent dead lock from calling
10322: -- inventory TM mulitple times in the same commit cycle.
10323: COMMIT;
10324: IF(l_MMTT_record > 0 AND

Line 10325: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN

10321: -- Fixed bug 4361566. Commit to prevent dead lock from calling
10322: -- inventory TM mulitple times in the same commit cycle.
10323: COMMIT;
10324: IF(l_MMTT_record > 0 AND
10325: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN
10326: -- Release user lock on backflush records per inventory request.
10327: inv_table_lock_pvt.release_locks(p_header_id => l_gib.mtl_header_id);
10328: END IF;
10329: -- Set savepoint again because commit will clear savepoint.

Line 10340: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10336: EXCEPTION
10337:
10338: WHEN fnd_api.g_exc_unexpected_error THEN
10339:
10340: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10341:
10342: ROLLBACK TO SAVEPOINT s_move_proc;
10343: /* Update process status to error */
10344: UPDATE wip_move_txn_interface

Line 10345: SET process_status = WIP_CONSTANTS.ERROR

10341:
10342: ROLLBACK TO SAVEPOINT s_move_proc;
10343: /* Update process status to error */
10344: UPDATE wip_move_txn_interface
10345: SET process_status = WIP_CONSTANTS.ERROR
10346: WHERE group_id = p_group_id
10347: AND process_status = WIP_CONSTANTS.RUNNING
10348: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10349:

Line 10347: AND process_status = WIP_CONSTANTS.RUNNING

10343: /* Update process status to error */
10344: UPDATE wip_move_txn_interface
10345: SET process_status = WIP_CONSTANTS.ERROR
10346: WHERE group_id = p_group_id
10347: AND process_status = WIP_CONSTANTS.RUNNING
10348: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10349:
10350: wip_utilities.get_message_stack(p_msg =>l_errMsg);
10351: IF(l_errMsg IS NULL) THEN

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

10396: ELSE
10397: ROLLBACK TO SAVEPOINT s_move_proc;
10398: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10399: END IF;
10400: IF (l_logLevel <= wip_constants.trace_logging) THEN
10401: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.processIntf',
10402: p_procReturnStatus => x_returnStatus,
10403: p_msg => l_errMsg,
10404: x_returnStatus => l_returnStatus);

Line 10415: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10411: END IF; -- move mode is background
10412:
10413: WHEN others THEN
10414: ROLLBACK TO SAVEPOINT s_move_proc;
10415: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10416:
10417: /* Update process status to error */
10418: UPDATE wip_move_txn_interface
10419: SET process_status = WIP_CONSTANTS.ERROR

Line 10419: SET process_status = WIP_CONSTANTS.ERROR

10415: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10416:
10417: /* Update process status to error */
10418: UPDATE wip_move_txn_interface
10419: SET process_status = WIP_CONSTANTS.ERROR
10420: WHERE group_id = p_group_id
10421: AND process_status = WIP_CONSTANTS.RUNNING
10422: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10423:

Line 10421: AND process_status = WIP_CONSTANTS.RUNNING

10417: /* Update process status to error */
10418: UPDATE wip_move_txn_interface
10419: SET process_status = WIP_CONSTANTS.ERROR
10420: WHERE group_id = p_group_id
10421: AND process_status = WIP_CONSTANTS.RUNNING
10422: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10423:
10424: l_errMsg := 'unexpected error: ' || SQLERRM;
10425:

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

10457: FROM wip_txn_interface_errors wtie
10458: WHERE wtie.transaction_id = wmti.transaction_id);
10459: ELSE -- move mode is online
10460: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10461: IF (l_logLevel <= wip_constants.trace_logging) THEN
10462: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.processIntf',
10463: p_procReturnStatus => x_returnStatus,
10464: p_msg => 'unexpected error: ' || SQLERRM,
10465: x_returnStatus => l_returnStatus);

Line 10493: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP

10489: AND wmti.organization_id = msn2.current_organization_id
10490: AND wmti.wip_entity_id = msn2.wip_entity_id
10491: AND msn2.group_mark_id IS NULL
10492: AND wmti.group_id = p_group_id
10493: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
10494: AND wmti.process_status = WIP_CONSTANTS.RUNNING
10495: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);
10496:
10497: /*--------------------------------------+

Line 10494: AND wmti.process_status = WIP_CONSTANTS.RUNNING

10490: AND wmti.wip_entity_id = msn2.wip_entity_id
10491: AND msn2.group_mark_id IS NULL
10492: AND wmti.group_id = p_group_id
10493: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
10494: AND wmti.process_status = WIP_CONSTANTS.RUNNING
10495: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);
10496:
10497: /*--------------------------------------+
10498: | Delete serial move interface records |

Line 10495: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);

10491: AND msn2.group_mark_id IS NULL
10492: AND wmti.group_id = p_group_id
10493: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
10494: AND wmti.process_status = WIP_CONSTANTS.RUNNING
10495: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);
10496:
10497: /*--------------------------------------+
10498: | Delete serial move interface records |
10499: +--------------------------------------*/

Line 10505: AND process_phase = WIP_CONSTANTS.BF_SETUP

10501: WHERE transaction_id IN
10502: (SELECT transaction_id
10503: FROM wip_move_txn_interface
10504: WHERE group_id = p_group_id
10505: AND process_phase = WIP_CONSTANTS.BF_SETUP
10506: AND process_status = WIP_CONSTANTS.RUNNING);
10507:
10508: /*-------------------------------+
10509: | Delete move interface records |

Line 10506: AND process_status = WIP_CONSTANTS.RUNNING);

10502: (SELECT transaction_id
10503: FROM wip_move_txn_interface
10504: WHERE group_id = p_group_id
10505: AND process_phase = WIP_CONSTANTS.BF_SETUP
10506: AND process_status = WIP_CONSTANTS.RUNNING);
10507:
10508: /*-------------------------------+
10509: | Delete move interface records |
10510: +-------------------------------*/

Line 10513: AND process_phase = WIP_CONSTANTS.BF_SETUP

10509: | Delete move interface records |
10510: +-------------------------------*/
10511: DELETE FROM wip_move_txn_interface
10512: WHERE group_id = p_group_id
10513: AND process_phase = WIP_CONSTANTS.BF_SETUP
10514: AND process_status = WIP_CONSTANTS.RUNNING;
10515:
10516: /*--------------------------------+
10517: | check for failed transactions |

Line 10514: AND process_status = WIP_CONSTANTS.RUNNING;

10510: +-------------------------------*/
10511: DELETE FROM wip_move_txn_interface
10512: WHERE group_id = p_group_id
10513: AND process_phase = WIP_CONSTANTS.BF_SETUP
10514: AND process_status = WIP_CONSTANTS.RUNNING;
10515:
10516: /*--------------------------------+
10517: | check for failed transactions |
10518: +--------------------------------*/

Line 10523: AND process_status in (WIP_CONSTANTS.ERROR, WIP_CONSTANTS.RUNNING);

10519: SELECT COUNT(1)
10520: INTO l_err_record
10521: FROM WIP_MOVE_TXN_INTERFACE
10522: WHERE GROUP_ID = p_group_id
10523: AND process_status in (WIP_CONSTANTS.ERROR, WIP_CONSTANTS.RUNNING);
10524:
10525: IF(l_err_record > 0) THEN
10526: /*===========================================================*/
10527: /* transactions in current group left in interface table - */

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

10533: -- background transaction. However, WIP_SOME_RECORDS_ERROR is only
10534: -- applicable for background transaction.
10535: --fnd_message.set_name('WIP', 'WIP_SOME_RECORDS_ERROR');
10536: --fnd_msg_pub.add;
10537: IF (l_logLevel <= wip_constants.trace_logging) THEN
10538: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processIntf',
10539: p_procReturnStatus => x_returnStatus,
10540: p_msg => 'some records error out',
10541: x_returnStatus => l_returnStatus);

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

10552: x_returnStatus to error again */
10553: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10554: ELSE
10555: x_returnStatus := fnd_api.g_ret_sts_success;
10556: IF (l_logLevel <= wip_constants.trace_logging) THEN
10557: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processIntf',
10558: p_procReturnStatus => x_returnStatus,
10559: p_msg => 'no record in this group error out',
10560: x_returnStatus => l_returnStatus);

Line 10592: SET process_status = WIP_CONSTANTS.RUNNING,

10588: BEGIN
10589: retcode := 0; -- success
10590: /* Set process phase to 'Running' */
10591: UPDATE wip_move_txn_interface
10592: SET process_status = WIP_CONSTANTS.RUNNING,
10593: last_update_date = SYSDATE,
10594: last_update_login = fnd_global.conc_login_id,
10595: request_id = fnd_global.conc_request_id,
10596: program_application_id = fnd_global.prog_appl_id,

Line 10604: WIP_CONSTANTS.WIP_MOVE_WORKER := 'Y';

10600:
10601: -- Fixed bug 4361566. Set global variable to let inventory know that they
10602: -- should not delete lock record from their temp table. These lock records
10603: -- will be deleted when wip call inv_table_lock_pvt.release_locks.
10604: WIP_CONSTANTS.WIP_MOVE_WORKER := 'Y';
10605:
10606: wip_movProc_priv.processIntf
10607: (p_group_id => p_group_id,
10608: p_proc_phase => p_proc_phase,

Line 10610: p_move_mode => WIP_CONSTANTS.BACKGROUND,

10606: wip_movProc_priv.processIntf
10607: (p_group_id => p_group_id,
10608: p_proc_phase => p_proc_phase,
10609: p_time_out => p_time_out,
10610: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10611: p_bf_mode => WIP_CONSTANTS.ONLINE,
10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10613: p_endDebug => FND_API.G_TRUE,
10614: p_initMsgList => FND_API.G_TRUE,

Line 10611: p_bf_mode => WIP_CONSTANTS.ONLINE,

10607: (p_group_id => p_group_id,
10608: p_proc_phase => p_proc_phase,
10609: p_time_out => p_time_out,
10610: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10611: p_bf_mode => WIP_CONSTANTS.ONLINE,
10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10613: p_endDebug => FND_API.G_TRUE,
10614: p_initMsgList => FND_API.G_TRUE,
10615: p_insertAssy => FND_API.G_TRUE,

Line 10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,

10608: p_proc_phase => p_proc_phase,
10609: p_time_out => p_time_out,
10610: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10611: p_bf_mode => WIP_CONSTANTS.ONLINE,
10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10613: p_endDebug => FND_API.G_TRUE,
10614: p_initMsgList => FND_API.G_TRUE,
10615: p_insertAssy => FND_API.G_TRUE,
10616: p_do_backflush => FND_API.G_TRUE,

Line 10618: p_allow_partial_commit => WIP_CONSTANTS.YES, -- Fixed bug 4361566.

10614: p_initMsgList => FND_API.G_TRUE,
10615: p_insertAssy => FND_API.G_TRUE,
10616: p_do_backflush => FND_API.G_TRUE,
10617: p_seq_move => p_seq_move,
10618: p_allow_partial_commit => WIP_CONSTANTS.YES, -- Fixed bug 4361566.
10619: x_returnStatus => l_returnStatus);
10620:
10621: -- Fixed bug 4361566. Reset global variable WIP_MOVE_WORKER to its original
10622: -- value.

Line 10623: WIP_CONSTANTS.WIP_MOVE_WORKER := 'N';

10619: x_returnStatus => l_returnStatus);
10620:
10621: -- Fixed bug 4361566. Reset global variable WIP_MOVE_WORKER to its original
10622: -- value.
10623: WIP_CONSTANTS.WIP_MOVE_WORKER := 'N';
10624:
10625: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10626: retcode := 2; -- error
10627: -- Fixed bug 5355443. Since WIP_SOME_RECORDS_ERROR message is only

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

10646: l_msg VARCHAR(240);
10647: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
10648: BEGIN
10649: -- write parameter value to log file
10650: IF (l_logLevel <= wip_constants.trace_logging) THEN
10651: l_params(1).paramName := 'p_tmp_id';
10652: l_params(1).paramValue := p_tmp_id;
10653: wip_logger.entryPoint(p_procName => 'wip_movProc_priv.repetitive_scrap',
10654: p_params => l_params,

Line 10699: AND mmtt.transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION;

10695: WHERE wmti.transaction_id = wmta.transaction_id
10696: AND wmti.organization_id = wmta.organization_id
10697: AND wmti.transaction_id = mmtt.move_transaction_id
10698: AND mmtt.transaction_temp_id = p_tmp_id
10699: AND mmtt.transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION;
10700:
10701: -- IF debug message level = 2, write statement below to log file
10702: IF (l_logLevel <= wip_constants.full_logging) THEN
10703: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');

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

10698: AND mmtt.transaction_temp_id = p_tmp_id
10699: AND mmtt.transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION;
10700:
10701: -- IF debug message level = 2, write statement below to log file
10702: IF (l_logLevel <= wip_constants.full_logging) THEN
10703: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
10704: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
10705: fnd_message.set_token('ENTITY2', 'MTL_MATERIAL_TXN_ALLOCATIONS');
10706: l_msg := fnd_message.get;

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

10713: WHEN others THEN
10714: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10715: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
10716:
10717: IF (l_logLevel <= wip_constants.trace_logging) THEN
10718: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.repetitive_scrap',
10719: p_procReturnStatus => x_returnStatus,
10720: p_msg => l_msg,
10721: x_returnStatus => l_returnStatus);

Line 10997: IF (l_log_level <= wip_constants.trace_logging) THEN

10993: so that messages from INV are not deleted */
10994: fnd_msg_pub.initialize;
10995:
10996: l_process_phase := '1';
10997: IF (l_log_level <= wip_constants.trace_logging) THEN
10998: l_params(1).paramName := 'p_group_id';
10999: l_params(1).paramValue := p_group_id;
11000: l_params(2).paramName := 'p_child_txn_id';
11001: l_params(2).paramValue := p_child_txn_id;

Line 11052: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,

11048: (p_group_id => p_group_id,
11049: p_child_txn_id => p_child_txn_id,
11050: p_mtl_header_id => p_mtl_header_id,
11051: p_assy_header_id => p_mtl_header_id,
11052: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11053: p_time_out => 0,
11054: p_move_mode => WIP_CONSTANTS.ONLINE,
11055: p_bf_mode => WIP_CONSTANTS.ONLINE,
11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,

Line 11054: p_move_mode => WIP_CONSTANTS.ONLINE,

11050: p_mtl_header_id => p_mtl_header_id,
11051: p_assy_header_id => p_mtl_header_id,
11052: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11053: p_time_out => 0,
11054: p_move_mode => WIP_CONSTANTS.ONLINE,
11055: p_bf_mode => WIP_CONSTANTS.ONLINE,
11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11057: p_endDebug => FND_API.G_FALSE,
11058: p_initMsgList => FND_API.G_TRUE,

Line 11055: p_bf_mode => WIP_CONSTANTS.ONLINE,

11051: p_assy_header_id => p_mtl_header_id,
11052: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11053: p_time_out => 0,
11054: p_move_mode => WIP_CONSTANTS.ONLINE,
11055: p_bf_mode => WIP_CONSTANTS.ONLINE,
11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11057: p_endDebug => FND_API.G_FALSE,
11058: p_initMsgList => FND_API.G_TRUE,
11059: p_insertAssy => FND_API.G_FALSE,

Line 11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,

11052: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11053: p_time_out => 0,
11054: p_move_mode => WIP_CONSTANTS.ONLINE,
11055: p_bf_mode => WIP_CONSTANTS.ONLINE,
11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11057: p_endDebug => FND_API.G_FALSE,
11058: p_initMsgList => FND_API.G_TRUE,
11059: p_insertAssy => FND_API.G_FALSE,
11060: p_do_backflush => p_do_backflush,

Line 11088: IF (l_log_level <= wip_constants.full_logging) THEN

11084: x_msg => l_error_msg);
11085: -- do not error out if label printing, only put warning message in log
11086: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
11087: wip_utilities.get_message_stack(p_msg => l_msg_stack);
11088: IF (l_log_level <= wip_constants.full_logging) THEN
11089: wip_logger.log(p_msg => 'An error has occurred with label printing.\n' ||
11090: 'The following error has occurred during ' ||
11091: 'printing: ' || l_msg_stack || '\n' ||
11092: 'Please check the Inventory log file for more ' ||

Line 11104: IF (l_log_level <= wip_constants.trace_logging) THEN

11100:
11101: x_returnStatus := fnd_api.g_ret_sts_success;
11102:
11103: -- write to the log file
11104: IF (l_log_level <= wip_constants.trace_logging) THEN
11105: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',
11106: p_procReturnStatus => x_returnStatus,
11107: p_msg => 'procedure complete',
11108: x_returnStatus => l_return_status);

Line 11125: IF (l_log_level <= wip_constants.trace_logging) THEN

11121: fnd_msg_pub.add;
11122: END LOOP;
11123: ROLLBACK TO SAVEPOINT s_oa_txn_proc;
11124: x_returnStatus := fnd_api.g_ret_sts_error;
11125: IF (l_log_level <= wip_constants.trace_logging) THEN
11126: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',
11127: p_procReturnStatus => x_returnStatus,
11128: p_msg => 'wip_movProc_priv.processOATxn failed : '
11129: || l_process_phase,

Line 11143: IF (l_log_level <= wip_constants.trace_logging) THEN

11139: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
11140: fnd_message.set_token('MESSAGE', l_error_msg);
11141: fnd_msg_pub.add;
11142:
11143: IF (l_log_level <= wip_constants.trace_logging) THEN
11144: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',
11145: p_procReturnStatus => x_returnStatus,
11146: p_msg => l_error_msg || ' : ' || l_process_phase,
11147: x_returnStatus => l_return_status);