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 388: if (l_logLevel <= wip_constants.full_logging) then

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

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

393: 'information.',
394: x_returnStatus =>dummy);
395: end if;
396: end if;
397: if (l_logLevel <= wip_constants.full_logging) then
398: wip_logger.log(p_msg => 'Label printing returned with status ' ||
399: l_retStatus,
400: x_returnStatus => dummy);
401: end if;

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

473: primaryCostMethod NUMBER;
474: l_dummy VARCHAR2(1);
475: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
476: BEGIN
477: if (l_logLevel <= wip_constants.full_logging) then
478: wip_logger.log('enter wmapcmpb.derive', l_dummy);
479: end if;
480:
481: -- get the job info

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

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

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

503: select mtl_material_transactions_s.nextval
504: into cmpRecord.transaction_interface_id
505: from dual;
506: else
507: if (l_logLevel <= wip_constants.full_logging) then
508: wip_logger.log('wmapcmpb.derive: using old int id', l_dummy);
509: end if;
510: cmpRecord.transaction_interface_id := parameters.transactionIntID;
511: end if;

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

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

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

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

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

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

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

537: 'N',
538: job.projectID,
539: job.taskID) = false) then
540: errMessage := fnd_message.get;
541: if (l_logLevel <= wip_constants.full_logging) then
542: wip_logger.log('wmapcmpb.derive: pjm_project_locator returns false', l_dummy);
543: end if;
544: return false;
545: end if;

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

543: end if;
544: return false;
545: end if;
546:
547: if (l_logLevel <= wip_constants.full_logging) then
548: wip_logger.log('wmapcmpb.derive: about to call getItem', l_dummy);
549: end if;
550:
551: -- get the item info

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

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

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

563:
564: -- get the item revision
565: cmpRecord.revision := null;
566:
567: if (l_logLevel <= wip_constants.full_logging) then
568: wip_logger.log('wmapcmpb.derive: about to call getRev', l_dummy);
569: end if;
570:
571: if (item.revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED) then

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

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

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

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

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

579: wip_logger.log('wmapcmpb.derive: wma_completion.getRevision returns false', l_dummy);
580: end if;
581: return false;
582: end if; -- getRevision
583: end if; -- revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED
584:
585: if (l_logLevel <= wip_constants.full_logging) then
586: wip_logger.log('wmapcmpb.derive: about to call tdatechk', l_dummy);
587: end if;

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

581: return false;
582: end if; -- getRevision
583: end if; -- revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED
584:
585: if (l_logLevel <= wip_constants.full_logging) then
586: wip_logger.log('wmapcmpb.derive: about to call tdatechk', l_dummy);
587: end if;
588:
589: -- get the accounting period

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

597: fnd_message.set_name(
598: application => 'INV',
599: name => 'INV_NO_OPEN_PERIOD');
600: errMessage := fnd_message.get;
601: if (l_logLevel <= wip_constants.full_logging) then
602: wip_logger.log('wmapcmpb.derive: tdatechk returns false', l_dummy);
603: end if;
604: return false;
605: end if;

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

609: lastOpSeq := getLastOpSeq (job);
610:
611:
612: -- set the quantity and the action id depending on the transaction type
613: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
614: cmpRecord.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
615: cmpRecord.transaction_quantity := parameters.transactionQty;
616: else -- return transaction
617: cmpRecord.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;

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

610:
611:
612: -- set the quantity and the action id depending on the transaction type
613: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
614: cmpRecord.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
615: cmpRecord.transaction_quantity := parameters.transactionQty;
616: else -- return transaction
617: cmpRecord.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;
618: cmpRecord.transaction_quantity := parameters.transactionQty * -1;

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

613: if (parameters.transactionType = WIP_CONSTANTS.CPLASSY_TYPE) then
614: cmpRecord.transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
615: cmpRecord.transaction_quantity := parameters.transactionQty;
616: else -- return transaction
617: cmpRecord.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;
618: cmpRecord.transaction_quantity := parameters.transactionQty * -1;
619: end if;
620: -- primary quantity is always equal to transaction quantity
621: cmpRecord.primary_quantity := cmpRecord.transaction_quantity;

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

643: cmpRecord.organization_id := parameters.environment.orgID;
644: cmpRecord.acct_period_id := periodID;
645: cmpRecord.last_update_date := sysdate;
646: cmpRecord.last_updated_by := parameters.environment.userID;
647: cmpRecord.wip_entity_type := WIP_CONSTANTS.DISCRETE;
648: cmpRecord.locator_id := parameters.locatorID;
649:
650: if (parameters.demandSourceHeaderID = 0) then
651: cmpRecord.demand_source_header_id := NULL;

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

660: end if;
661:
662: --do not use online processing mode as it will disable over-cpl
663: --processing in the processor (due to desktop forms logic)
664: if(txnMode = wip_constants.online) then
665: cmpRecord.transaction_mode := wip_constants.online;
666: else
667: cmpRecord.transaction_mode := txnMode;
668: end if;

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

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

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

668: end if;
669:
670: cmpRecord.operation_seq_num := lastOpSeq;
671:
672: cmpRecord.process_flag := wip_constants.mti_inventory;
673:
674:
675: -- cmpRecord.posting_flag := 'Y';
676: cmpRecord.item_lot_control_code := item.lotControlCode;

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

715: cmpRecord.overcompletion_primary_qty :=
716: parameters.transactionQty - availableQty;
717:
718: -- set the value of the record wip_cplProc_priv.completion_rec_t
719: overCplRec.wipEntityType := WIP_CONSTANTS.DISCRETE;
720: overCplRec.wipEntityID := cmpRecord.transaction_source_id;
721: overCplRec.orgID := cmpRecord.organization_id;
722: overCplRec.repLineID := null; -- only used for repetitive
723: overCplRec.itemID := cmpRecord.inventory_item_id;

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

817: return false;
818: end if;
819: -- get the item revision
820: LpnCmpRecord.row.bom_revision := null;
821: if (item.revQtyControlCode = WIP_CONSTANTS.REVISION_CONTROLLED) then
822: if(NOT wma_completion.getRevision(
823: wipEntityID => parameters.wipEntityID,
824: orgID => parameters.environment.orgID,
825: itemID => parameters.itemID,

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

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

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

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

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

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

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

861: lpnCmpRecord.row.overcompletion_primary_qty := parameters.transactionQty - availableQty;
862: end if; -- overcompletion
863: */
864: else -- return transaction
865: lpnCmpRecord.row.transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION;
866: lpnCmpRecord.row.transaction_quantity := parameters.transactionQty * -1;
867: end if;
868:
869: -- primary quantity is always equal to transaction quantity

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

875: lpnCmpRecord.row.transaction_source_type_id := 5;
876: lpnCmpRecord.row.header_id := parameters.headerID;
877:
878: --do not use online as online will prevent over-completion processing
879: lpnCmpRecord.row.transaction_mode := wip_constants.online;
880:
881:
882: lpnCmpRecord.row.created_by := parameters.environment.userID;
883: lpnCmpRecord.row.creation_date := sysdate;

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

890: lpnCmpRecord.row.acct_period_id := periodID;
891: lpnCmpRecord.row.last_update_date := sysdate;
892: lpnCmpRecord.row.last_updated_by := parameters.environment.userID;
893: lpnCmpRecord.row.wip_entity_id := parameters.wipEntityID;
894: lpnCmpRecord.row.wip_entity_type := WIP_CONSTANTS.DISCRETE;
895: lpnCmpRecord.row.locator_id := parameters.locatorID;
896: lpnCmpRecord.row.operation_seq_num := lastOpSeq;
897: -- lpnCmpRecord.row.item_description := item.description;
898: lpnCmpRecord.row.qa_collection_id := parameters.qualityID;

Line 969: * transactionType either WIP_CONSTANTS.CPLASSY_TYPE or RETASSY_TYPE

965: * Parameters:
966: * orgID the organization job belongs to
967: * wipEntityID the job ID used to check the overcompletion tolerance
968: * overcomplete flag to indicate if user chose to overcomplete
969: * transactionType either WIP_CONSTANTS.CPLASSY_TYPE or RETASSY_TYPE
970: * transactionQty the quantity to transact
971: * availableQty the quantity availabe to the job
972: * completedQty the job quantity completed
973: * Returns:

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

996: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
997: /* Fixed bug 3693148 */
998: l_job_type NUMBER;
999: BEGIN
1000: if (l_logLevel <= wip_constants.trace_logging) then
1001: l_params(1).paramName := 'not printing params';
1002: l_params(1).paramValue := ' ';
1003: wip_logger.entryPoint(p_procName => 'wma_completion.checkQuantity',
1004: p_params => l_params,

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

1007:
1008: if (transactionQty <= 0) then
1009: fnd_message.set_name ('INV', 'INV_GREATER_THAN_ZERO');
1010: errMessage := fnd_message.get;
1011: if (l_logLevel <= wip_constants.trace_logging) then
1012: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1013: p_procReturnStatus => -1,
1014: p_msg => errMessage,
1015: x_returnStatus => l_returnStatus);

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

1022: fnd_message.set_name ('WIP', 'WIP_GREATER_THAN');
1023: fnd_message.set_token('ENTITY1', 'TRANSACTION QUANTITY-CAP', TRUE);
1024: fnd_message.set_token('ENTITY2', 'QTY AVAIL TO COMPLETE', TRUE);
1025: errMessage := fnd_message.get;
1026: if (l_logLevel <= wip_constants.trace_logging) then
1027: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1028: p_procReturnStatus => -1,
1029: p_msg => errMessage,
1030: x_returnStatus => l_returnStatus);

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

1041: p_organization_id => orgID,
1042: p_wip_entity_id => wipEntityID,
1043: p_primary_quantity => ocQtyToCheck,
1044: p_result => result);
1045: if (result = wip_constants.no) then -- quantity exceeds tolerance
1046: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
1047: errMessage := fnd_message.get;
1048: if (l_logLevel <= wip_constants.trace_logging) then
1049: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',

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

1044: p_result => result);
1045: if (result = wip_constants.no) then -- quantity exceeds tolerance
1046: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
1047: errMessage := fnd_message.get;
1048: if (l_logLevel <= wip_constants.trace_logging) then
1049: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1050: p_procReturnStatus => -1,
1051: p_msg => errMessage,
1052: x_returnStatus => l_returnStatus);

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

1061: suitable for both completion and return */
1062: if (transactionQty > availableQty) then
1063: fnd_message.set_name ('INV', 'INV_QTY_LESS_OR_EQUAL');
1064: errMessage := fnd_message.get;
1065: if (l_logLevel <= wip_constants.trace_logging) then
1066: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1067: p_procReturnStatus => -1,
1068: p_msg => errMessage,
1069: x_returnStatus => l_returnStatus);

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

1077: where wip_entity_id = wipEntityID
1078: and organization_id = orgID;
1079:
1080: /* ER 4163405: Re-add the condition here for return transactions only */
1081: if (transactionType = wip_constants.retassy_type) then
1082:
1083: -- validate return quantity
1084: /* Fixed bug 3693148. We should allow overreturn for non-standard job*/
1085: if (l_job_type = WIP_CONSTANTS.STANDARD AND

Line 1085: if (l_job_type = WIP_CONSTANTS.STANDARD AND

1081: if (transactionType = wip_constants.retassy_type) then
1082:
1083: -- validate return quantity
1084: /* Fixed bug 3693148. We should allow overreturn for non-standard job*/
1085: if (l_job_type = WIP_CONSTANTS.STANDARD AND
1086: transactionQty > completedQty) then
1087: fnd_message.set_name ('WIP', 'WIP_LESS_OR_EQUAL');
1088: fnd_message.set_token('ENTITY1', 'TOTAL TXN QTY-CAP', TRUE);
1089: fnd_message.set_token('ENTITY2', 'JOB COMPLETE QUANTITY', TRUE);

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

1087: fnd_message.set_name ('WIP', 'WIP_LESS_OR_EQUAL');
1088: fnd_message.set_token('ENTITY1', 'TOTAL TXN QTY-CAP', TRUE);
1089: fnd_message.set_token('ENTITY2', 'JOB COMPLETE QUANTITY', TRUE);
1090: errMessage := fnd_message.get;
1091: if (l_logLevel <= wip_constants.trace_logging) then
1092: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1093: p_procReturnStatus => -1,
1094: p_msg => errMessage,
1095: x_returnStatus => l_returnStatus);

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

1097: return false;
1098: end if;
1099: end if;
1100: end if; -- quantity validation
1101: if (l_logLevel <= wip_constants.trace_logging) then
1102: wip_logger.exitPoint(p_procName => 'wma_completion.checkQuantity',
1103: p_procReturnStatus => 0,
1104: p_msg => 'success',
1105: x_returnStatus => l_returnStatus);

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

1123: l_returnStatus VARCHAR2(1);
1124: l_params wip_logger.param_tbl_t;
1125: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
1126: begin
1127: if (l_logLevel <= wip_constants.trace_logging) then
1128: l_params(1).paramName := 'not printing params';
1129: l_params(1).paramValue := ' ';
1130: wip_logger.entryPoint(p_procName => 'wma_completion.checkOverCpl',
1131: p_params => l_params,

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

1139: p_wip_entity_id => p_wipEntityID,
1140: p_primary_quantity => p_overCplQty,
1141: p_result => result);
1142:
1143: if (result = WIP_CONSTANTS.NO) then
1144: -- exceed tolerance, set error message
1145: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
1146: x_errMessage := fnd_message.get;
1147: x_returnStatus := fnd_api.g_ret_sts_error;

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

1147: x_returnStatus := fnd_api.g_ret_sts_error;
1148: end if;
1149: end if;
1150:
1151: if (l_logLevel <= wip_constants.trace_logging) then
1152: wip_logger.exitPoint(p_procName => 'wma_completion.checkOverCpl',
1153: p_procReturnStatus => 0,
1154: p_msg => x_errMessage,
1155: x_returnStatus => l_returnStatus);

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

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

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

1280: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1281: l_rowID rowid;
1282: l_retStatus VARCHAR2(1);
1283: BEGIN
1284: if (l_logLevel <= wip_constants.full_logging) then
1285: wip_logger.log('before insert', l_dummy);
1286: wip_logger.log('before insert item' || cmpRecord.inventory_item_id, l_dummy);
1287: wip_logger.log('before insert org' || cmpRecord.organization_id, l_dummy);
1288: wip_logger.log('before insert subinv' || cmpRecord.subinventory_code, l_dummy);

Line 1384: wip_constants.ASSY_BATCH_SEQ,

1380: cmpRecord.overcompletion_primary_qty,
1381: cmpRecord.kanban_card_id,
1382: cmpRecord.lpn_id,
1383: cmpRecord.transaction_header_id,
1384: wip_constants.ASSY_BATCH_SEQ,
1385: cmpRecord.demand_source_header_id,
1386: cmpRecord.demand_source_line_id);
1387: if (l_logLevel <= wip_constants.full_logging) then
1388: wip_logger.log('after insert', l_dummy);

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

1383: cmpRecord.transaction_header_id,
1384: wip_constants.ASSY_BATCH_SEQ,
1385: cmpRecord.demand_source_header_id,
1386: cmpRecord.demand_source_line_id);
1387: if (l_logLevel <= wip_constants.full_logging) then
1388: wip_logger.log('after insert', l_dummy);
1389: end if;
1390:
1391:

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

1393: p_initMsgList => fnd_api.g_true,
1394: x_returnStatus => l_retStatus);
1395:
1396: if(l_retStatus <> fnd_api.g_ret_sts_success) then
1397: if (l_logLevel <= wip_constants.full_logging) then
1398: wip_logger.log('error from validateInterfaceTxns', l_retStatus);
1399: end if;
1400: wip_utilities.get_message_stack(p_msg => errMessage);
1401: return false;

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

1402: end if;
1403: return true;
1404: EXCEPTION
1405: when others then
1406: if (l_logLevel <= wip_constants.full_logging) then
1407: wip_logger.log('put failed: ' || SQLERRM, l_dummy);
1408: end if;
1409: fnd_message.set_name ('WIP', 'GENERIC_ERROR');
1410: fnd_message.set_token ('FUNCTION', 'wma_completion.put');

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

1511: l_returnStatus VARCHAR2(1);
1512: l_params wip_logger.param_tbl_t;
1513: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
1514: begin
1515: if (l_logLevel <= wip_constants.trace_logging) then
1516: l_params(1).paramName := 'not printing params';
1517: l_params(1).paramValue := ' ';
1518: wip_logger.entryPoint(p_procName => 'wma_completion.backflush',
1519: p_params => l_params,

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

1529:
1530: --change from verify all to exceptions only if in background mode
1531: --this is b/c in background mode, component l/s information should
1532: --not be enterable by the user
1533: if(l_txnMode = wip_constants.background) then
1534: if(x_lotEntryType = wip_constants.recdate_full) then
1535: x_lotEntryType := wip_constants.recdate_exc;
1536: elsif(x_lotEntryType = wip_constants.expdate_full) then
1537: x_lotEntryType := wip_constants.expdate_exc;

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

1530: --change from verify all to exceptions only if in background mode
1531: --this is b/c in background mode, component l/s information should
1532: --not be enterable by the user
1533: if(l_txnMode = wip_constants.background) then
1534: if(x_lotEntryType = wip_constants.recdate_full) then
1535: x_lotEntryType := wip_constants.recdate_exc;
1536: elsif(x_lotEntryType = wip_constants.expdate_full) then
1537: x_lotEntryType := wip_constants.expdate_exc;
1538: end if;

Line 1535: x_lotEntryType := wip_constants.recdate_exc;

1531: --this is b/c in background mode, component l/s information should
1532: --not be enterable by the user
1533: if(l_txnMode = wip_constants.background) then
1534: if(x_lotEntryType = wip_constants.recdate_full) then
1535: x_lotEntryType := wip_constants.recdate_exc;
1536: elsif(x_lotEntryType = wip_constants.expdate_full) then
1537: x_lotEntryType := wip_constants.expdate_exc;
1538: end if;
1539: end if;

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

1532: --not be enterable by the user
1533: if(l_txnMode = wip_constants.background) then
1534: if(x_lotEntryType = wip_constants.recdate_full) then
1535: x_lotEntryType := wip_constants.recdate_exc;
1536: elsif(x_lotEntryType = wip_constants.expdate_full) then
1537: x_lotEntryType := wip_constants.expdate_exc;
1538: end if;
1539: end if;
1540:

Line 1537: x_lotEntryType := wip_constants.expdate_exc;

1533: if(l_txnMode = wip_constants.background) then
1534: if(x_lotEntryType = wip_constants.recdate_full) then
1535: x_lotEntryType := wip_constants.recdate_exc;
1536: elsif(x_lotEntryType = wip_constants.expdate_full) then
1537: x_lotEntryType := wip_constants.expdate_exc;
1538: end if;
1539: end if;
1540:
1541: select nvl(min(operation_seq_num), 1), nvl(max(operation_seq_num), 1)

Line 1550: p_wipEntityType => wip_constants.discrete,

1546: l_compTbl := system.wip_component_tbl_t();
1547:
1548: --online. need to backflush components
1549: wip_bflProc_priv.processRequirements(p_wipEntityID => p_jobID,
1550: p_wipEntityType => wip_constants.discrete,
1551: p_cplTxnID => p_cplTxnID,
1552: p_orgID => p_orgID,
1553: p_assyQty => p_cplQty,
1554: p_txnDate => p_txnDate,

Line 1555: p_wipSupplyType => wip_constants.assy_pull,

1551: p_cplTxnID => p_cplTxnID,
1552: p_orgID => p_orgID,
1553: p_assyQty => p_cplQty,
1554: p_txnDate => p_txnDate,
1555: p_wipSupplyType => wip_constants.assy_pull,
1556: p_txnHdrID => p_txnHdrID,
1557: p_firstOp => -1,
1558: p_lastOp => l_maxOpSeqNum,
1559: p_mergeMode => fnd_api.g_false,

Line 1571: p_wipEntityType => wip_constants.discrete,

1567: end if;
1568:
1569: if(p_overCplQty > 0) then --backflush move components if any exist
1570: wip_bflProc_priv.processRequirements(p_wipEntityID => p_jobID,
1571: p_wipEntityType => wip_constants.discrete,
1572: p_movTxnID => p_movTxnID,
1573: p_orgID => p_orgID,
1574: p_assyQty => p_overCplQty,
1575: p_txnDate => p_txnDate,

Line 1576: p_wipSupplyType => wip_constants.op_pull,

1572: p_movTxnID => p_movTxnID,
1573: p_orgID => p_orgID,
1574: p_assyQty => p_overCplQty,
1575: p_txnDate => p_txnDate,
1576: p_wipSupplyType => wip_constants.op_pull,
1577: p_txnHdrID => p_txnHdrID,
1578: p_firstMoveOp => l_minOpSeqNum,
1579: p_lastMoveOp => l_maxOpSeqNum,
1580: p_firstOp => -1,

Line 1611: l_txnMode = wip_constants.background) then

1607: --if there is missing l/s info for a background txn, error out.
1608: --note that we are ignoring the serialization derivation below b/c
1609: --serialized pages are only online...
1610: if(x_returnStatus = fnd_api.g_ret_sts_error and
1611: l_txnMode = wip_constants.background) then
1612: fnd_message.set_name('WIP', 'WIP_NO_LS_COMP_IN_BKGND');
1613: fnd_msg_pub.add;
1614: raise fnd_api.g_exc_unexpected_error;
1615: end if;

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

1631: raise fnd_api.g_exc_unexpected_error;
1632: end if;
1633: end if;
1634:
1635: if(l_txnMode = wip_constants.background) then
1636: x_returnStatus := fnd_api.g_ret_sts_success;
1637: if (l_logLevel <= wip_constants.trace_logging) then
1638: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1639: p_procReturnStatus => x_returnStatus,

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

1633: end if;
1634:
1635: if(l_txnMode = wip_constants.background) then
1636: x_returnStatus := fnd_api.g_ret_sts_success;
1637: if (l_logLevel <= wip_constants.trace_logging) then
1638: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1639: p_procReturnStatus => x_returnStatus,
1640: p_msg => x_errMessage,
1641: x_returnStatus => l_returnStatus);

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

1642: end if;
1643: return; --do nothing for now
1644: end if;
1645:
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 => 'success',
1650: x_returnStatus => l_returnStatus);

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

1652: exception
1653: when fnd_api.g_exc_unexpected_error then
1654: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1655: x_errMessage := fnd_msg_pub.get(p_encoded => 'F');
1656: if (l_logLevel <= wip_constants.trace_logging) then
1657: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1658: p_procReturnStatus => x_returnStatus,
1659: p_msg => x_errMessage,
1660: x_returnStatus => l_returnStatus);

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

1662: rollback;
1663: when others then
1664: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1665: x_errMessage := SQLERRM;
1666: if (l_logLevel <= wip_constants.trace_logging) then
1667: wip_logger.exitPoint(p_procName => 'wma_completion.backflush',
1668: p_procReturnStatus => x_returnStatus,
1669: p_msg => x_errMessage,
1670: x_returnStatus => l_returnStatus);