The following lines contain the word 'select', 'insert', 'update' or 'delete':
resRecord ResTxnRec; -- record to populate and insert
* resRecord preparing it to be inserted into the interface table.
* Parameters:
* resRecord record to be populated. The minimum number of fields to
* execute the transaction successfully are populated
* parameters resource transaction mobile form parameters
* errMessage populated if an error occurrs
* Return:
* boolean flag indicating the successful derivation of necessary values
*/
Function derive(resRecord IN OUT NOCOPY ResTxnRec,
parameters IN ResParams,
errMessage IN OUT NOCOPY VARCHAR2)
return boolean IS
BEGIN
/**
* populate required fields in the resource record. If the fields specify
* a resource not defined in the operation, the Cost Manager associates
* this new resource to the operation, then charges the resource
*/
resRecord.row.created_by_name := parameters.environment.userName;
resRecord.row.last_update_date := sysdate;
resRecord.row.last_updated_by_name := parameters.environment.userName;
* Inserts a populated ResTxnRec record into WIP_COST_TXN_INTERFACE
* Parameters:
* resRecord The ResTxnRec representing the row to be inserted.
* errMessage populated if an error occurrs
* Return:
* boolean A flag indicating whether table update was successful or not.
*/
Function put(resRecord IN ResTxnRec,
errMessage IN OUT NOCOPY VARCHAR2) RETURN boolean IS
BEGIN
insert into wip_cost_txn_interface
(created_by_name,
creation_date,
last_update_date,
last_updated_by_name,
operation_seq_num,
organization_code,
organization_id,
process_phase,
process_status,
resource_code,
resource_seq_num,
source_code,
transaction_date,
transaction_quantity,
transaction_type,
transaction_uom,
entity_type,
wip_entity_id,
wip_entity_name)
values (resRecord.row.created_by_name,
resRecord.row.creation_date,
resRecord.row.last_update_date,
resRecord.row.last_updated_by_name,
resRecord.row.operation_seq_num,
resRecord.row.organization_code,
resRecord.row.organization_id,
resRecord.row.process_phase,
resRecord.row.process_status,
resRecord.row.resource_code,
resRecord.row.resource_seq_num,
resRecord.row.source_code,
resRecord.row.transaction_date,
resRecord.row.transaction_quantity,
resRecord.row.transaction_type,
resRecord.row.transaction_uom,
resRecord.row.entity_type,
resRecord.row.wip_entity_id,
resRecord.row.wip_entity_name);