The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE updateSerials(p_header_id IN NUMBER,
x_err_msg OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2) IS
CURSOR c_serials IS
SELECT wlc.inventory_item_id,
wlc.organization_id,
wlcs.fm_serial_number,
wlcs.to_serial_number
FROM wip_lpn_completions wlc, wip_lpn_completions_serials wlcs
WHERE wlc.header_id = p_header_id
and wlc.header_id = wlcs.header_id;
SAVEPOINT PRE_UPDATE;
ROLLBACK TO PRE_UPDATE;
end updateSerials;
updateSerials(p_header_id => p_header_id,
x_err_msg => x_err_msg,
x_return_status => x_return_status);
updateSerials(p_header_id => p_header_id,
x_err_msg => x_err_msg,
x_return_status => x_return_status);
SELECT HEADER_ID
FROM WIP_LPN_COMPLETIONS
WHERE v_source_id = SOURCE_ID
AND v_source_id <> HEADER_ID;
select mtl_material_transactions_s.nextval
into mmttParameter.transactionIntID
from dual;
/* select DEFAULT_PULL_SUPPLY_SUBINV,
DEFAULT_PULL_SUPPLY_LOCATOR_ID
into mmttParameter.subinventoryCode,
mmttParameter.locatorID
from wip_parameters
where organization_id = p_orgID;
wma_flow.insertParentRecordIntoMMTT(mmttParameter, l_ret_value , x_err_msg);
wip_logger.log('assy insert failed', dummyErrCode);
select transaction_source_id
into p_wipEntityID
from mtl_material_transactions_temp
where transaction_temp_id = p_processTempID;
delete from mtl_material_transactions_temp
where transaction_temp_id = p_processTempID;
Delete MTLT and MSNT records also*/
delete mtl_serial_numbers_temp
where transaction_temp_id = p_processTempID
or transaction_temp_id in (
select serial_transaction_temp_id
from mtl_transaction_lots_temp
where transaction_temp_id = p_processTempID);
delete mtl_transaction_lots_temp
where transaction_temp_id = p_processTempID;
Delete MTLT and MSNT records also*/
--process the components
wip_mtlTempProc_priv.processTemp(p_initMsgList => fnd_api.g_true,
p_txnHdrID => p_processHeaderID,
p_txnMode => wip_constants.online,
p_destroyQtyTrees => fnd_api.g_true,
p_endDebug => fnd_api.g_false,
x_returnStatus => x_return_status,
x_errorMsg => x_err_msg);
wip_logger.log('assy lpn insert failed', dummyErrCode);
updateSerials(p_header_id => lpnParameter.headerID,
x_err_msg => x_err_msg,
x_return_status => x_return_status);
wip_logger.log('updateSerials failed', dummyErrCode);
* wma online processor in mmtt first, then deletes those records and
* populates wip_lpn_completions for wms processing.
*
* parameters: p_orgID -- current org
* p_userID -- current user
* p_transactionHeaderID -- header ID in wip_lpn_completions
* p_processHeaderID -- transaction header ID in mmtt
* p_processIntID -- transaction temp ID in mmtt
* x_err_msg -- err_msg if call fails, null if success
* x_return_status -- fnd_api.G_RET_STS_SUCCESS ('S') if successful
*/
PROCEDURE lpnCompleteJob (p_orgID NUMBER,
p_userID NUMBER,
p_transactionTypeID NUMBER,
p_transactionHeaderID NUMBER,
p_completionTxnID NUMBER,
p_processHeaderID NUMBER,
p_processIntID NUMBER,
p_processCmpTxnID NUMBER,
p_wipEntityID NUMBER,
p_wipEntityName VARCHAR2,
p_assyItemID NUMBER,
p_assyItemName VARCHAR2,
p_overcomplete NUMBER,
p_transactionQty NUMBER,
p_transactionUOM VARCHAR2,
p_qualityID NUMBER,
p_kanbanID NUMBER,
p_projectID NUMBER,
p_taskID NUMBER,
p_lpnID NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_err_msg OUT NOCOPY VARCHAR2) IS
environment wma_common.Environment;
delete mtl_material_transactions_temp
where transaction_temp_id = l_cmpl_txnTmpID;
will also be deleted along with the parent MMTT record. */
delete mtl_serial_numbers_temp
where transaction_temp_id = l_cmpl_txnTmpID
or transaction_temp_id in (
select serial_transaction_temp_id
from mtl_transaction_lots_temp
where transaction_temp_id = l_cmpl_txnTmpID);
delete mtl_transaction_lots_temp
where transaction_temp_id = l_cmpl_txnTmpID;
updateSerials(p_header_id => lpnParameters.headerID,
x_err_msg => x_err_msg,
x_return_status => x_return_status);
wip_logger.log('updateSerials failed', dummyErrCode);