DBA Data[Home] [Help]

APPS.WMA_COMPLETION dependencies on WIP_CONSTANTS

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

33: l_overCplRec wip_cplProc_priv.completion_rec_t;
34: BEGIN
35: savepoint wma_cmp_proc10;
36:
37: if (l_logLevel <= wip_constants.trace_logging) then
38: --logging not fully supported in this package.
39: l_paramTbl(1).paramName := 'not printing params';
40: l_paramTbl(1).paramValue := ' ';
41: --just skip

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

44: x_returnStatus => errCode);
45: end if;
46:
47: status := 0;
48: if (l_logLevel <= wip_constants.full_logging) then
49: wip_logger.log('enter wmapcmpb.process. int id is ' || parameters.transactionIntID, errCode);
50: end if;
51:
52: --if the caller has chosen to override the wip parameter, use that value, otherwise use the

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

58: -- process error
59: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
60: fnd_message.set_token('MESSAGE', error);
61: fnd_msg_pub.add;
62: if (l_logLevel <= wip_constants.full_logging) then
63: wip_logger.log('error from derive', errCode);
64: end if;
65: raise fnd_api.g_exc_unexpected_error;
66: end if;

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

63: wip_logger.log('error from derive', errCode);
64: end if;
65: raise fnd_api.g_exc_unexpected_error;
66: end if;
67: if (l_logLevel <= wip_constants.full_logging) then
68: wip_logger.log('new tmp id is ' || cmpRecord.transaction_interface_id, errCode);
69: end if;
70:
71: -- insert into the interface table for background processing

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

69: end if;
70:
71: -- insert into the interface table for background processing
72: if (put(cmpRecord, errMessage) = FALSE) then
73: if (l_logLevel <= wip_constants.full_logging) then
74: wip_logger.log('error from put', errCode);
75: end if;
76: raise fnd_api.g_exc_unexpected_error;
77: end if;

Line 87: if(primaryCostMethod in (wip_constants.cost_avg,

83:
84: --insert a row into cst_comp_snap_temp
85: /* Fix for bug 4252359. Do this only for non-LPN completions. WMS will
86: take care of LPN completions through bug 4059728*/
87: if(primaryCostMethod in (wip_constants.cost_avg,
88: wip_constants.cost_fifo,
89: wip_constants.cost_lifo)
90: AND parameters.lpnID IS NULL) then
91: retValue := CSTACOSN.op_snapshot(i_txn_temp_id => cmpRecord.transaction_interface_id,

Line 88: wip_constants.cost_fifo,

84: --insert a row into cst_comp_snap_temp
85: /* Fix for bug 4252359. Do this only for non-LPN completions. WMS will
86: take care of LPN completions through bug 4059728*/
87: if(primaryCostMethod in (wip_constants.cost_avg,
88: wip_constants.cost_fifo,
89: wip_constants.cost_lifo)
90: AND parameters.lpnID IS NULL) then
91: retValue := CSTACOSN.op_snapshot(i_txn_temp_id => cmpRecord.transaction_interface_id,
92: err_num => errNum,

Line 89: wip_constants.cost_lifo)

85: /* Fix for bug 4252359. Do this only for non-LPN completions. WMS will
86: take care of LPN completions through bug 4059728*/
87: if(primaryCostMethod in (wip_constants.cost_avg,
88: wip_constants.cost_fifo,
89: wip_constants.cost_lifo)
90: AND parameters.lpnID IS NULL) then
91: retValue := CSTACOSN.op_snapshot(i_txn_temp_id => cmpRecord.transaction_interface_id,
92: err_num => errNum,
93: err_code => errMessage,

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

95: if(retValue <> 1) then
96: fnd_message.set_name(application => 'CST',
97: name => 'CST_SNAPSHOT_FAILED');
98: fnd_msg_pub.add;
99: if (l_logLevel <= wip_constants.full_logging) then
100: wip_logger.log('error from cst', errMessage);
101: end if;
102: raise fnd_api.g_exc_unexpected_error;
103: end if;

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

112: p_business_flow_code => 26); -- discrete business flow code
113: -- do not error out if label printing, only put warning message in log
114: if(returnStatus <> fnd_api.g_ret_sts_success) then
115: wip_utilities.get_message_stack(p_msg => l_msg_stack);
116: if (l_logLevel <= wip_constants.full_logging) then
117: wip_logger.log(p_msg => 'An error has occurred with label printing.\n' ||
118: 'The following error has occurred during ' ||
119: 'printing: ' || l_msg_stack || '\n' ||
120: 'Please check the Inventory log file for more ' ||

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

121: 'information.',
122: x_returnStatus =>dummy);
123: end if;
124: end if;
125: if (l_logLevel <= wip_constants.full_logging) then
126: wip_logger.log(p_msg => 'Label printing returned with status ' ||
127: returnStatus,
128: x_returnStatus => dummy);
129: end if;

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

128: x_returnStatus => dummy);
129: end if;
130:
131:
132: if (l_logLevel <= wip_constants.full_logging) then
133: wip_logger.log('wma_completion.process: tmpID => ' || cmpRecord.transaction_interface_id, returnStatus);
134: end if;
135:
136: --if a return from the serialized page, re-populate the wip_entity_id,

Line 139: if (parameters.isFromSerializedPage = wip_constants.yes and

135:
136: --if a return from the serialized page, re-populate the wip_entity_id,
137: --intraoperation_seq_num, and intraoperation_step_type columns in MSN.
138: --select it here to get the serial number before it leaves the temp table.
139: if (parameters.isFromSerializedPage = wip_constants.yes and
140: parameters.transactionType = wip_constants.retassy_type) then
141:
142: if(cmpRecord.item_lot_control_code = wip_constants.lot) then
143: select fm_serial_number

Line 140: parameters.transactionType = wip_constants.retassy_type) then

136: --if a return from the serialized page, re-populate the wip_entity_id,
137: --intraoperation_seq_num, and intraoperation_step_type columns in MSN.
138: --select it here to get the serial number before it leaves the temp table.
139: if (parameters.isFromSerializedPage = wip_constants.yes and
140: parameters.transactionType = wip_constants.retassy_type) then
141:
142: if(cmpRecord.item_lot_control_code = wip_constants.lot) then
143: select fm_serial_number
144: into l_serialNum

Line 142: if(cmpRecord.item_lot_control_code = wip_constants.lot) then

138: --select it here to get the serial number before it leaves the temp table.
139: if (parameters.isFromSerializedPage = wip_constants.yes and
140: parameters.transactionType = wip_constants.retassy_type) then
141:
142: if(cmpRecord.item_lot_control_code = wip_constants.lot) then
143: select fm_serial_number
144: into l_serialNum
145: from mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt
146: where mtlt.serial_transaction_temp_id = msnt.transaction_temp_id

Line 159: l_txnMode = WIP_CONSTANTS.ONLINE) then

155:
156: -- call wip_cplProc_priv.processOverCpl() if overomplete transaction and
157: -- transaction_mode is online.
158: if (parameters.overcomplete = true AND
159: l_txnMode = WIP_CONSTANTS.ONLINE) then
160: wip_cplProc_priv.processOverCpl(p_cplRec => l_overCplRec,
161: x_returnStatus => returnStatus);
162:
163: if (l_logLevel <= wip_constants.full_logging) then

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

159: l_txnMode = WIP_CONSTANTS.ONLINE) then
160: wip_cplProc_priv.processOverCpl(p_cplRec => l_overCplRec,
161: x_returnStatus => returnStatus);
162:
163: if (l_logLevel <= wip_constants.full_logging) then
164: wip_logger.log('wma_completion.process: overcomplete retStatus => ' ||
165: returnStatus, dummy);
166: end if;
167:

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

184: x_returnStatus => returnStatus,
185: x_errorMsg => errMessage);
186: end if;
187:
188: if (l_logLevel <= wip_constants.full_logging) then
189: wip_logger.log('wma_completion.process: retStatus => ' || returnStatus, dummy);
190: end if;
191: if(returnStatus <> fnd_api.g_ret_sts_success) then
192: raise fnd_api.g_exc_unexpected_error;

Line 198: if (parameters.isFromSerializedPage = wip_constants.yes and

194:
195: --update to MSN must take place after inventory processing as they always clear the
196: --group mark id when processing a serial. Here we have to repopulate the group_mark_id,
197: --wip_entity_id, op_seq, and intra_op columns.
198: if (parameters.isFromSerializedPage = wip_constants.yes and
199: parameters.transactionType = wip_constants.retassy_type) then
200: if (l_logLevel <= wip_constants.full_logging) then
201: wip_logger.log('wma_completion.process: about to update serial', dummy);
202: end if;

Line 199: parameters.transactionType = wip_constants.retassy_type) then

195: --update to MSN must take place after inventory processing as they always clear the
196: --group mark id when processing a serial. Here we have to repopulate the group_mark_id,
197: --wip_entity_id, op_seq, and intra_op columns.
198: if (parameters.isFromSerializedPage = wip_constants.yes and
199: parameters.transactionType = wip_constants.retassy_type) then
200: if (l_logLevel <= wip_constants.full_logging) then
201: wip_logger.log('wma_completion.process: about to update serial', dummy);
202: end if;
203: if(cmpRecord.operation_seq_num = -1) then

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

196: --group mark id when processing a serial. Here we have to repopulate the group_mark_id,
197: --wip_entity_id, op_seq, and intra_op columns.
198: if (parameters.isFromSerializedPage = wip_constants.yes and
199: parameters.transactionType = wip_constants.retassy_type) then
200: if (l_logLevel <= wip_constants.full_logging) then
201: wip_logger.log('wma_completion.process: about to update serial', dummy);
202: end if;
203: if(cmpRecord.operation_seq_num = -1) then
204: wip_utilities.update_serial(p_serial_number => l_serialNum,

Line 217: p_intraoperation_step_type => wip_constants.toMove,

213: p_inventory_item_id => parameters.itemID,
214: p_organization_id => parameters.environment.orgID,
215: p_wip_entity_id => parameters.wipEntityID,
216: p_operation_seq_num => cmpRecord.operation_seq_num,
217: p_intraoperation_step_type => wip_constants.toMove,
218: x_return_status => returnStatus);
219: end if;
220: if (l_logLevel <= wip_constants.full_logging) then
221: wip_logger.log('wma_completion.process: serialization op retStatus => ' || returnStatus, dummy);

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

216: p_operation_seq_num => cmpRecord.operation_seq_num,
217: p_intraoperation_step_type => wip_constants.toMove,
218: x_return_status => returnStatus);
219: end if;
220: if (l_logLevel <= wip_constants.full_logging) then
221: wip_logger.log('wma_completion.process: serialization op retStatus => ' || returnStatus, dummy);
222: end if;
223: if(returnStatus <> fnd_api.g_ret_sts_success) then
224: if (l_logLevel <= wip_constants.full_logging) then

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

220: if (l_logLevel <= wip_constants.full_logging) then
221: wip_logger.log('wma_completion.process: serialization op retStatus => ' || returnStatus, dummy);
222: end if;
223: if(returnStatus <> fnd_api.g_ret_sts_success) then
224: if (l_logLevel <= wip_constants.full_logging) then
225: wip_logger.log('wma_completion.process: retStatus of serial update failure ' || returnStatus, dummy);
226: end if;
227: wip_utilities.get_message_stack(p_msg => errMessage);
228: raise fnd_api.g_exc_unexpected_error;

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

227: wip_utilities.get_message_stack(p_msg => errMessage);
228: raise fnd_api.g_exc_unexpected_error;
229: end if;
230: end if;
231: if (l_logLevel <= wip_constants.trace_logging) then
232: wip_logger.exitPoint(p_procName => 'wma_completion.process',
233: p_procReturnStatus => status,
234: p_msg => 'success',
235: x_returnStatus => dummy);

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

237: wip_logger.cleanUp(dummy);
238: EXCEPTION
239: when fnd_api.g_exc_unexpected_error then
240: status := -1;
241: if (l_logLevel <= wip_constants.trace_logging) then
242: wip_logger.exitPoint(p_procName => 'wma_completion.process',
243: p_procReturnStatus => status,
244: p_msg => 'failure',
245: x_returnStatus => dummy);

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

247: end if;
248: rollback to wma_cmp_proc10;
249: when others then
250: status := -1;
251: if (l_logLevel <= wip_constants.trace_logging) then
252: wip_logger.exitPoint(p_procName => 'wma_completion.process',
253: p_procReturnStatus => status,
254: p_msg => 'exception',
255: x_returnStatus => dummy);

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

389: p_business_flow_code => 26); -- discrete business flow code
390: -- do not error out if label printing, only put warning message in log
391: if(l_retStatus <> fnd_api.g_ret_sts_success) then
392: wip_utilities.get_message_stack(p_msg => l_msg_stack);
393: if (l_logLevel <= wip_constants.full_logging) then
394: wip_logger.log(p_msg => 'An error has occurred with label printing.\n' ||
395: 'The following error has occurred during ' ||
396: 'printing: ' || l_msg_stack || '\n' ||
397: 'Please check the Inventory log file for more ' ||

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

398: 'information.',
399: x_returnStatus =>dummy);
400: end if;
401: end if;
402: if (l_logLevel <= wip_constants.full_logging) then
403: wip_logger.log(p_msg => 'Label printing returned with status ' ||
404: l_retStatus,
405: x_returnStatus => dummy);
406: end if;

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

478: primaryCostMethod NUMBER;
479: l_dummy VARCHAR2(1);
480: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
481: BEGIN
482: if (l_logLevel <= wip_constants.full_logging) then
483: wip_logger.log('enter wmapcmpb.derive', l_dummy);
484: end if;
485:
486: -- get the job info

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

501: --may have to populate the txn temp id for costing.
502: --the conditional population is probably not necessary, need
503: --to check with inv
504: if(parameters.transactionIntID is null or parameters.transactionIntID <= 0) then
505: if (l_logLevel <= wip_constants.full_logging) then
506: wip_logger.log('wmapcmpb.derive: selecting new int id', l_dummy);
507: end if;
508: select mtl_material_transactions_s.nextval
509: into cmpRecord.transaction_interface_id

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

508: select mtl_material_transactions_s.nextval
509: into cmpRecord.transaction_interface_id
510: from dual;
511: else
512: if (l_logLevel <= wip_constants.full_logging) then
513: wip_logger.log('wmapcmpb.derive: using old int id', l_dummy);
514: end if;
515: cmpRecord.transaction_interface_id := parameters.transactionIntID;
516: end if;

Line 519: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then

515: cmpRecord.transaction_interface_id := parameters.transactionIntID;
516: end if;
517:
518: /* ER 4163405: Restricting quantity check to completion only */
519: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
520: -- validate transaction quantity.
521: if (checkQuantity(parameters, job, errMessage) = false) then
522: if (l_logLevel <= wip_constants.full_logging) then
523: wip_logger.log('wmapcmpb.derive: chkQty returns false', l_dummy);

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

518: /* ER 4163405: Restricting quantity check to completion only */
519: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
520: -- validate transaction quantity.
521: if (checkQuantity(parameters, job, errMessage) = false) then
522: if (l_logLevel <= wip_constants.full_logging) then
523: wip_logger.log('wmapcmpb.derive: chkQty returns false', l_dummy);
524: end if;
525: return false;
526: end if;

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

525: return false;
526: end if;
527: end if;
528:
529: if (l_logLevel <= wip_constants.full_logging) then
530: wip_logger.log('wmapcmpb.derive: about to call pjm', l_dummy);
531: wip_logger.log('org:' || parameters.environment.orgID, l_dummy);
532: wip_logger.log('loc:' || parameters.locatorID, l_dummy);
533: wip_logger.log('prj:' || job.projectID, l_dummy);

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

542: 'N',
543: job.projectID,
544: job.taskID) = false) then
545: errMessage := fnd_message.get;
546: if (l_logLevel <= wip_constants.full_logging) then
547: wip_logger.log('wmapcmpb.derive: pjm_project_locator returns false', l_dummy);
548: end if;
549: return false;
550: end if;

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

548: end if;
549: return false;
550: end if;
551:
552: if (l_logLevel <= wip_constants.full_logging) then
553: wip_logger.log('wmapcmpb.derive: about to call getItem', l_dummy);
554: end if;
555:
556: -- get the item info

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

559: parameters.locatorID);
560: if (item.invItemID is null) then
561: fnd_message.set_name ('WIP', 'WIP_ITEM_DOES_NOT_EXIST');
562: errMessage := fnd_message.get;
563: if (l_logLevel <= wip_constants.full_logging) then
564: wip_logger.log('wmapcmpb.derive: wma_derive.getItem returns false', l_dummy);
565: end if;
566: return false;
567: end if;

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

568:
569: -- get the item revision
570: cmpRecord.revision := null;
571:
572: if (l_logLevel <= wip_constants.full_logging) then
573: wip_logger.log('wmapcmpb.derive: about to call getRev', l_dummy);
574: end if;
575:
576: if (item.revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED) then

Line 576: if (item.revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED) then

572: if (l_logLevel <= wip_constants.full_logging) then
573: wip_logger.log('wmapcmpb.derive: about to call getRev', l_dummy);
574: end if;
575:
576: if (item.revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED) then
577: if(NOT wma_completion.getRevision(
578: wipEntityID => parameters.wipEntityID,
579: orgID => parameters.environment.orgID,
580: itemID => parameters.itemID,

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

579: orgID => parameters.environment.orgID,
580: itemID => parameters.itemID,
581: revision => cmpRecord.revision)) then
582: errMessage := substr(fnd_message.get,1,241);
583: if (l_logLevel <= wip_constants.full_logging) then
584: wip_logger.log('wmapcmpb.derive: wma_completion.getRevision returns false', l_dummy);
585: end if;
586: return false;
587: end if; -- getRevision

Line 588: end if; -- revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED

584: wip_logger.log('wmapcmpb.derive: wma_completion.getRevision returns false', l_dummy);
585: end if;
586: return false;
587: end if; -- getRevision
588: end if; -- revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED
589:
590: if (l_logLevel <= wip_constants.full_logging) then
591: wip_logger.log('wmapcmpb.derive: about to call tdatechk', l_dummy);
592: end if;

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

586: return false;
587: end if; -- getRevision
588: end if; -- revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED
589:
590: if (l_logLevel <= wip_constants.full_logging) then
591: wip_logger.log('wmapcmpb.derive: about to call tdatechk', l_dummy);
592: end if;
593:
594: -- get the accounting period

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

602: fnd_message.set_name(
603: application => 'INV',
604: name => 'INV_NO_OPEN_PERIOD');
605: errMessage := fnd_message.get;
606: if (l_logLevel <= wip_constants.full_logging) then
607: wip_logger.log('wmapcmpb.derive: tdatechk returns false', l_dummy);
608: end if;
609: return false;
610: end if;

Line 618: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then

614: lastOpSeq := getLastOpSeq (job);
615:
616:
617: -- set the quantity and the action id depending on the transaction type
618: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
619: cmpRecord.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
620: cmpRecord.transaction_quantity := parameters.transactionQty;
621: else -- return transaction
622: cmpRecord.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;

Line 619: cmpRecord.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;

615:
616:
617: -- set the quantity and the action id depending on the transaction type
618: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
619: cmpRecord.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
620: cmpRecord.transaction_quantity := parameters.transactionQty;
621: else -- return transaction
622: cmpRecord.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;
623: cmpRecord.transaction_quantity := parameters.transactionQty * -1;

Line 622: cmpRecord.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;

618: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
619: cmpRecord.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
620: cmpRecord.transaction_quantity := parameters.transactionQty;
621: else -- return transaction
622: cmpRecord.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;
623: cmpRecord.transaction_quantity := parameters.transactionQty * -1;
624: end if;
625: -- primary quantity is always equal to transaction quantity
626: cmpRecord.primary_quantity := cmpRecord.transaction_quantity;

Line 652: cmpRecord.wip_entity_type := WIP_CONSTANTS.DISCRETE;

648: cmpRecord.organization_id := parameters.environment.orgID;
649: cmpRecord.acct_period_id := periodID;
650: cmpRecord.last_update_date := sysdate;
651: cmpRecord.last_updated_by := parameters.environment.userID;
652: cmpRecord.wip_entity_type := WIP_CONSTANTS.DISCRETE;
653: cmpRecord.locator_id := parameters.locatorID;
654:
655: if (parameters.demandSourceHeaderID = 0) then
656: cmpRecord.demand_source_header_id := NULL;

Line 669: if(txnMode = wip_constants.online) then

665: end if;
666:
667: --do not use online processing mode as it will disable over-cpl
668: --processing in the processor (due to desktop forms logic)
669: if(txnMode = wip_constants.online) then
670: cmpRecord.transaction_mode := wip_constants.online;
671: else
672: cmpRecord.transaction_mode := txnMode;
673: end if;

Line 670: cmpRecord.transaction_mode := wip_constants.online;

666:
667: --do not use online processing mode as it will disable over-cpl
668: --processing in the processor (due to desktop forms logic)
669: if(txnMode = wip_constants.online) then
670: cmpRecord.transaction_mode := wip_constants.online;
671: else
672: cmpRecord.transaction_mode := txnMode;
673: end if;
674:

Line 677: cmpRecord.process_flag := wip_constants.mti_inventory;

673: end if;
674:
675: cmpRecord.operation_seq_num := lastOpSeq;
676:
677: cmpRecord.process_flag := wip_constants.mti_inventory;
678:
679:
680: -- cmpRecord.posting_flag := 'Y';
681: cmpRecord.item_lot_control_code := item.lotControlCode;

Line 724: overCplRec.wipEntityType := WIP_CONSTANTS.DISCRETE;

720: cmpRecord.overcompletion_primary_qty :=
721: parameters.transactionQty - availableQty;
722:
723: -- set the value of the record wip_cplProc_priv.completion_rec_t
724: overCplRec.wipEntityType := WIP_CONSTANTS.DISCRETE;
725: overCplRec.wipEntityID := cmpRecord.transaction_source_id;
726: overCplRec.orgID := cmpRecord.organization_id;
727: overCplRec.repLineID := null; -- only used for repetitive
728: overCplRec.itemID := cmpRecord.inventory_item_id;

Line 826: if (item.revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED) then

822: return false;
823: end if;
824: -- get the item revision
825: LpnCmpRecord.row.bom_revision := null;
826: if (item.revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED) then
827: if(NOT wma_completion.getRevision(
828: wipEntityID => parameters.wipEntityID,
829: orgID => parameters.environment.orgID,
830: itemID => parameters.itemID,

Line 835: end if; -- revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED

831: revision => lpnCmpRecord.row.bom_revision)) then
832: errMessage := substr(fnd_message.get, 1, 241);
833: return false;
834: end if; -- getRevision
835: end if; -- revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED
836:
837: -- get the accounting period
838: invttmtx.tdatechk(
839: org_id => parameters.environment.orgID,

Line 856: if (parameters.transactionTypeID = WIP_CONSTANTS.CPLASSY_TYPE) then

852: -- get the last operation sequence
853: lastOpSeq := getLastOpSeq (job);
854:
855: -- set the quantity and the action id depending on the transaction type
856: if (parameters.transactionTypeID = WIP_CONSTANTS.CPLASSY_TYPE) then
857: lpnCmpRecord.row.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
858: lpnCmpRecord.row.transaction_quantity := parameters.transactionQty;
859: /* if (parameters.overcomplete = true) then --never happens?
860: -- generate an overcompletion txn id only if the assembly has a routing

Line 857: lpnCmpRecord.row.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;

853: lastOpSeq := getLastOpSeq (job);
854:
855: -- set the quantity and the action id depending on the transaction type
856: if (parameters.transactionTypeID = WIP_CONSTANTS.CPLASSY_TYPE) then
857: lpnCmpRecord.row.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
858: lpnCmpRecord.row.transaction_quantity := parameters.transactionQty;
859: /* if (parameters.overcomplete = true) then --never happens?
860: -- generate an overcompletion txn id only if the assembly has a routing
861: if (lastOpSeq <> -1) then

Line 870: lpnCmpRecord.row.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;

866: lpnCmpRecord.row.overcompletion_primary_qty := parameters.transactionQty - availableQty;
867: end if; -- overcompletion
868: */
869: else -- return transaction
870: lpnCmpRecord.row.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;
871: lpnCmpRecord.row.transaction_quantity := parameters.transactionQty * -1;
872: end if;
873:
874: -- primary quantity is always equal to transaction quantity

Line 884: lpnCmpRecord.row.transaction_mode := wip_constants.online;

880: lpnCmpRecord.row.transaction_source_type_id := 5;
881: lpnCmpRecord.row.header_id := parameters.headerID;
882:
883: --do not use online as online will prevent over-completion processing
884: lpnCmpRecord.row.transaction_mode := wip_constants.online;
885:
886:
887: lpnCmpRecord.row.created_by := parameters.environment.userID;
888: lpnCmpRecord.row.creation_date := sysdate;

Line 899: lpnCmpRecord.row.wip_entity_type := WIP_CONSTANTS.DISCRETE;

895: lpnCmpRecord.row.acct_period_id := periodID;
896: lpnCmpRecord.row.last_update_date := sysdate;
897: lpnCmpRecord.row.last_updated_by := parameters.environment.userID;
898: lpnCmpRecord.row.wip_entity_id := parameters.wipEntityID;
899: lpnCmpRecord.row.wip_entity_type := WIP_CONSTANTS.DISCRETE;
900: lpnCmpRecord.row.locator_id := parameters.locatorID;
901: lpnCmpRecord.row.operation_seq_num := lastOpSeq;
902: -- lpnCmpRecord.row.item_description := item.description;
903: lpnCmpRecord.row.qa_collection_id := parameters.qualityID;

Line 978: * transactionType either WIP_CONSTANTS.CPLASSY_TYPE or RETASSY_TYPE

974: * Parameters:
975: * orgID the organization job belongs to
976: * wipEntityID the job ID used to check the overcompletion tolerance
977: * overcomplete flag to indicate if user chose to overcomplete
978: * transactionType either WIP_CONSTANTS.CPLASSY_TYPE or RETASSY_TYPE
979: * transactionQty the quantity to transact
980: * availableQty the quantity availabe to the job
981: * completedQty the job quantity completed
982: * Returns:

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

1005: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
1006: /* Fixed bug 3693148 */
1007: l_job_type NUMBER;
1008: BEGIN
1009: if (l_logLevel <= wip_constants.trace_logging) then
1010: l_params(1).paramName := 'not printing params';
1011: l_params(1).paramValue := ' ';
1012: wip_logger.entryPoint(p_procName => 'wma_completion.checkQuantity',
1013: p_params => l_params,

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

1016:
1017: if (transactionQty <= 0) then
1018: fnd_message.set_name ('INV', 'INV_GREATER_THAN_ZERO');
1019: errMessage := fnd_message.get;
1020: if (l_logLevel <= wip_constants.trace_logging) then
1021: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1022: p_procReturnStatus => -1,
1023: p_msg => errMessage,
1024: x_returnStatus => l_returnStatus);

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

1031: fnd_message.set_name ('WIP', 'WIP_GREATER_THAN');
1032: fnd_message.set_token('ENTITY1', 'TRANSACTION QUANTITY-CAP', TRUE);
1033: fnd_message.set_token('ENTITY2', 'QTY AVAIL TO COMPLETE', TRUE);
1034: errMessage := fnd_message.get;
1035: if (l_logLevel <= wip_constants.trace_logging) then
1036: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1037: p_procReturnStatus => -1,
1038: p_msg => errMessage,
1039: x_returnStatus => l_returnStatus);

Line 1054: if (result = wip_constants.no) then -- quantity exceeds tolerance

1050: p_organization_id => orgID,
1051: p_wip_entity_id => wipEntityID,
1052: p_primary_quantity => ocQtyToCheck,
1053: p_result => result);
1054: if (result = wip_constants.no) then -- quantity exceeds tolerance
1055: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
1056: errMessage := fnd_message.get;
1057: if (l_logLevel <= wip_constants.trace_logging) then
1058: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',

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

1053: p_result => result);
1054: if (result = wip_constants.no) then -- quantity exceeds tolerance
1055: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
1056: errMessage := fnd_message.get;
1057: if (l_logLevel <= wip_constants.trace_logging) then
1058: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1059: p_procReturnStatus => -1,
1060: p_msg => errMessage,
1061: x_returnStatus => l_returnStatus);

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

1070: suitable for both completion and return */
1071: if (transactionQty > availableQty) then
1072: fnd_message.set_name ('INV', 'INV_QTY_LESS_OR_EQUAL');
1073: errMessage := fnd_message.get;
1074: if (l_logLevel <= wip_constants.trace_logging) then
1075: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1076: p_procReturnStatus => -1,
1077: p_msg => errMessage,
1078: x_returnStatus => l_returnStatus);

Line 1090: if (transactionType = wip_constants.retassy_type) then

1086: where wip_entity_id = wipEntityID
1087: and organization_id = orgID;
1088:
1089: /* ER 4163405: Re-add the condition here for return transactions only */
1090: if (transactionType = wip_constants.retassy_type) then
1091:
1092: -- validate return quantity
1093: /* Fixed bug 3693148. We should allow overreturn for non-standard job*/
1094: if (l_job_type = WIP_CONSTANTS.STANDARD AND

Line 1094: if (l_job_type = WIP_CONSTANTS.STANDARD AND

1090: if (transactionType = wip_constants.retassy_type) then
1091:
1092: -- validate return quantity
1093: /* Fixed bug 3693148. We should allow overreturn for non-standard job*/
1094: if (l_job_type = WIP_CONSTANTS.STANDARD AND
1095: transactionQty > completedQty) then
1096: fnd_message.set_name ('WIP', 'WIP_LESS_OR_EQUAL');
1097: fnd_message.set_token('ENTITY1', 'TOTAL TXN QTY-CAP', TRUE);
1098: fnd_message.set_token('ENTITY2', 'JOB COMPLETE QUANTITY', TRUE);

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

1096: fnd_message.set_name ('WIP', 'WIP_LESS_OR_EQUAL');
1097: fnd_message.set_token('ENTITY1', 'TOTAL TXN QTY-CAP', TRUE);
1098: fnd_message.set_token('ENTITY2', 'JOB COMPLETE QUANTITY', TRUE);
1099: errMessage := fnd_message.get;
1100: if (l_logLevel <= wip_constants.trace_logging) then
1101: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1102: p_procReturnStatus => -1,
1103: p_msg => errMessage,
1104: x_returnStatus => l_returnStatus);

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

1106: return false;
1107: end if;
1108: end if;
1109: end if; -- quantity validation
1110: if (l_logLevel <= wip_constants.trace_logging) then
1111: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1112: p_procReturnStatus => 0,
1113: p_msg => 'success',
1114: x_returnStatus => l_returnStatus);

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

1132: l_returnStatus VARCHAR2(1);
1133: l_params wip_logger.param_tbl_t;
1134: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
1135: begin
1136: if (l_logLevel <= wip_constants.trace_logging) then
1137: l_params(1).paramName := 'not printing params';
1138: l_params(1).paramValue := ' ';
1139: wip_logger.entryPoint(p_procName => 'wma_completion.checkOverCpl',
1140: p_params => l_params,

Line 1152: if (result = WIP_CONSTANTS.NO) then

1148: p_wip_entity_id => p_wipEntityID,
1149: p_primary_quantity => p_overCplQty,
1150: p_result => result);
1151:
1152: if (result = WIP_CONSTANTS.NO) then
1153: -- exceed tolerance, set error message
1154: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
1155: x_errMessage := fnd_message.get;
1156: x_returnStatus := fnd_api.g_ret_sts_error;

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

1156: x_returnStatus := fnd_api.g_ret_sts_error;
1157: end if;
1158: end if;
1159:
1160: if (l_logLevel <= wip_constants.trace_logging) then
1161: wip_logger.exitPoint(p_procName => 'wma_completion.checkOverCpl',
1162: p_procReturnStatus => 0,
1163: p_msg => x_errMessage,
1164: x_returnStatus => l_returnStatus);

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

1165: end if;
1166: EXCEPTION
1167: when others then
1168: x_returnStatus := fnd_api.g_ret_sts_error;
1169: if (l_logLevel <= wip_constants.trace_logging) then
1170: wip_logger.exitPoint(p_procName => 'wma_completion.checkOverCpl',
1171: p_procReturnStatus => -1,
1172: p_msg => x_errMessage,
1173: x_returnStatus => l_returnStatus);

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

1289: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1290: l_rowID rowid;
1291: l_retStatus VARCHAR2(1);
1292: BEGIN
1293: if (l_logLevel <= wip_constants.full_logging) then
1294: wip_logger.log('before insert', l_dummy);
1295: wip_logger.log('before insert item' || cmpRecord.inventory_item_id, l_dummy);
1296: wip_logger.log('before insert org' || cmpRecord.organization_id, l_dummy);
1297: wip_logger.log('before insert subinv' || cmpRecord.subinventory_code, l_dummy);

Line 1393: wip_constants.ASSY_BATCH_SEQ,

1389: cmpRecord.overcompletion_primary_qty,
1390: cmpRecord.kanban_card_id,
1391: cmpRecord.lpn_id,
1392: cmpRecord.transaction_header_id,
1393: wip_constants.ASSY_BATCH_SEQ,
1394: cmpRecord.demand_source_header_id,
1395: cmpRecord.demand_source_line_id);
1396: if (l_logLevel <= wip_constants.full_logging) then
1397: wip_logger.log('after insert', l_dummy);

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

1392: cmpRecord.transaction_header_id,
1393: wip_constants.ASSY_BATCH_SEQ,
1394: cmpRecord.demand_source_header_id,
1395: cmpRecord.demand_source_line_id);
1396: if (l_logLevel <= wip_constants.full_logging) then
1397: wip_logger.log('after insert', l_dummy);
1398: end if;
1399:
1400:

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

1402: p_initMsgList => fnd_api.g_true,
1403: x_returnStatus => l_retStatus);
1404:
1405: if(l_retStatus <> fnd_api.g_ret_sts_success) then
1406: if (l_logLevel <= wip_constants.full_logging) then
1407: wip_logger.log('error from validateInterfaceTxns', l_retStatus);
1408: end if;
1409: wip_utilities.get_message_stack(p_msg => errMessage);
1410: return false;

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

1411: end if;
1412: return true;
1413: EXCEPTION
1414: when others then
1415: if (l_logLevel <= wip_constants.full_logging) then
1416: wip_logger.log('put failed: ' || SQLERRM, l_dummy);
1417: end if;
1418: fnd_message.set_name ('WIP', 'GENERIC_ERROR');
1419: fnd_message.set_token ('FUNCTION', 'wma_completion.put');

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

1520: l_returnStatus VARCHAR2(1);
1521: l_params wip_logger.param_tbl_t;
1522: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
1523: begin
1524: if (l_logLevel <= wip_constants.trace_logging) then
1525: l_params(1).paramName := 'not printing params';
1526: l_params(1).paramValue := ' ';
1527: wip_logger.entryPoint(p_procName => 'wma_completion.backflush',
1528: p_params => l_params,

Line 1542: if(l_txnMode = wip_constants.background) then

1538:
1539: --change from verify all to exceptions only if in background mode
1540: --this is b/c in background mode, component l/s information should
1541: --not be enterable by the user
1542: if(l_txnMode = wip_constants.background) then
1543: if(x_lotEntryType = wip_constants.recdate_full) then
1544: x_lotEntryType := wip_constants.recdate_exc;
1545: elsif(x_lotEntryType = wip_constants.expdate_full) then
1546: x_lotEntryType := wip_constants.expdate_exc;

Line 1543: if(x_lotEntryType = wip_constants.recdate_full) then

1539: --change from verify all to exceptions only if in background mode
1540: --this is b/c in background mode, component l/s information should
1541: --not be enterable by the user
1542: if(l_txnMode = wip_constants.background) then
1543: if(x_lotEntryType = wip_constants.recdate_full) then
1544: x_lotEntryType := wip_constants.recdate_exc;
1545: elsif(x_lotEntryType = wip_constants.expdate_full) then
1546: x_lotEntryType := wip_constants.expdate_exc;
1547: end if;

Line 1544: x_lotEntryType := wip_constants.recdate_exc;

1540: --this is b/c in background mode, component l/s information should
1541: --not be enterable by the user
1542: if(l_txnMode = wip_constants.background) then
1543: if(x_lotEntryType = wip_constants.recdate_full) then
1544: x_lotEntryType := wip_constants.recdate_exc;
1545: elsif(x_lotEntryType = wip_constants.expdate_full) then
1546: x_lotEntryType := wip_constants.expdate_exc;
1547: end if;
1548: end if;

Line 1545: elsif(x_lotEntryType = wip_constants.expdate_full) then

1541: --not be enterable by the user
1542: if(l_txnMode = wip_constants.background) then
1543: if(x_lotEntryType = wip_constants.recdate_full) then
1544: x_lotEntryType := wip_constants.recdate_exc;
1545: elsif(x_lotEntryType = wip_constants.expdate_full) then
1546: x_lotEntryType := wip_constants.expdate_exc;
1547: end if;
1548: end if;
1549:

Line 1546: x_lotEntryType := wip_constants.expdate_exc;

1542: if(l_txnMode = wip_constants.background) then
1543: if(x_lotEntryType = wip_constants.recdate_full) then
1544: x_lotEntryType := wip_constants.recdate_exc;
1545: elsif(x_lotEntryType = wip_constants.expdate_full) then
1546: x_lotEntryType := wip_constants.expdate_exc;
1547: end if;
1548: end if;
1549:
1550: select nvl(min(operation_seq_num), 1), nvl(max(operation_seq_num), 1)

Line 1559: p_wipEntityType => wip_constants.discrete,

1555: l_compTbl := system.wip_component_tbl_t();
1556:
1557: --online. need to backflush components
1558: wip_bflProc_priv.processRequirements(p_wipEntityID => p_jobID,
1559: p_wipEntityType => wip_constants.discrete,
1560: p_cplTxnID => p_cplTxnID,
1561: p_orgID => p_orgID,
1562: p_assyQty => p_cplQty,
1563: p_txnDate => p_txnDate,

Line 1564: p_wipSupplyType => wip_constants.assy_pull,

1560: p_cplTxnID => p_cplTxnID,
1561: p_orgID => p_orgID,
1562: p_assyQty => p_cplQty,
1563: p_txnDate => p_txnDate,
1564: p_wipSupplyType => wip_constants.assy_pull,
1565: p_txnHdrID => p_txnHdrID,
1566: p_firstOp => -1,
1567: p_lastOp => l_maxOpSeqNum,
1568: p_mergeMode => fnd_api.g_false,

Line 1580: p_wipEntityType => wip_constants.discrete,

1576: end if;
1577:
1578: if(p_overCplQty > 0) then --backflush move components if any exist
1579: wip_bflProc_priv.processRequirements(p_wipEntityID => p_jobID,
1580: p_wipEntityType => wip_constants.discrete,
1581: p_movTxnID => p_movTxnID,
1582: p_orgID => p_orgID,
1583: p_assyQty => p_overCplQty,
1584: p_txnDate => p_txnDate,

Line 1585: p_wipSupplyType => wip_constants.op_pull,

1581: p_movTxnID => p_movTxnID,
1582: p_orgID => p_orgID,
1583: p_assyQty => p_overCplQty,
1584: p_txnDate => p_txnDate,
1585: p_wipSupplyType => wip_constants.op_pull,
1586: p_txnHdrID => p_txnHdrID,
1587: p_firstMoveOp => l_minOpSeqNum,
1588: p_lastMoveOp => l_maxOpSeqNum,
1589: p_firstOp => -1,

Line 1620: l_txnMode = wip_constants.background) then

1616: --if there is missing l/s info for a background txn, error out.
1617: --note that we are ignoring the serialization derivation below b/c
1618: --serialized pages are only online...
1619: if(x_returnStatus = fnd_api.g_ret_sts_error and
1620: l_txnMode = wip_constants.background) then
1621: fnd_message.set_name('WIP', 'WIP_NO_LS_COMP_IN_BKGND');
1622: fnd_msg_pub.add;
1623: raise fnd_api.g_exc_unexpected_error;
1624: end if;

Line 1644: if(l_txnMode = wip_constants.background) then

1640: raise fnd_api.g_exc_unexpected_error;
1641: end if;
1642: end if;
1643:
1644: if(l_txnMode = wip_constants.background) then
1645: x_returnStatus := fnd_api.g_ret_sts_success;
1646: if (l_logLevel <= wip_constants.trace_logging) then
1647: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1648: p_procReturnStatus => x_returnStatus,

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

1642: end if;
1643:
1644: if(l_txnMode = wip_constants.background) then
1645: x_returnStatus := fnd_api.g_ret_sts_success;
1646: if (l_logLevel <= wip_constants.trace_logging) then
1647: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1648: p_procReturnStatus => x_returnStatus,
1649: p_msg => x_errMessage,
1650: x_returnStatus => l_returnStatus);

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

1651: end if;
1652: return; --do nothing for now
1653: end if;
1654:
1655: if (l_logLevel <= wip_constants.trace_logging) then
1656: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1657: p_procReturnStatus => x_returnStatus,
1658: p_msg => 'success',
1659: x_returnStatus => l_returnStatus);

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

1661: exception
1662: when fnd_api.g_exc_unexpected_error then
1663: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1664: x_errMessage := fnd_msg_pub.get(p_encoded => 'F');
1665: if (l_logLevel <= wip_constants.trace_logging) then
1666: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1667: p_procReturnStatus => x_returnStatus,
1668: p_msg => x_errMessage,
1669: x_returnStatus => l_returnStatus);

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

1671: rollback;
1672: when others then
1673: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1674: x_errMessage := SQLERRM;
1675: if (l_logLevel <= wip_constants.trace_logging) then
1676: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1677: p_procReturnStatus => x_returnStatus,
1678: p_msg => x_errMessage,
1679: x_returnStatus => l_returnStatus);