The following lines contain the word 'select', 'insert', 'update' or 'delete':
IF NOT inv_globals.equal(p_trohdr_rec.last_updated_by, p_old_trohdr_rec.last_updated_by) THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_last_updated_by;
IF NOT inv_globals.equal(p_trohdr_rec.last_update_date, p_old_trohdr_rec.last_update_date) THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_last_update_date;
IF NOT inv_globals.equal(p_trohdr_rec.last_update_login, p_old_trohdr_rec.last_update_login) THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_last_update_login;
IF NOT inv_globals.equal(p_trohdr_rec.program_update_date, p_old_trohdr_rec.program_update_date) THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_program_update_date;
ELSIF p_attr_id = g_last_updated_by THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_last_updated_by;
ELSIF p_attr_id = g_last_update_date THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_last_update_date;
ELSIF p_attr_id = g_last_update_login THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_last_update_login;
ELSIF p_attr_id = g_program_update_date THEN
l_index := l_index + 1;
l_src_attr_tbl(l_index) := inv_trohdr_util.g_program_update_date;
IF NOT inv_globals.equal(p_trohdr_rec.last_updated_by, p_old_trohdr_rec.last_updated_by) THEN
NULL;
IF NOT inv_globals.equal(p_trohdr_rec.last_update_date, p_old_trohdr_rec.last_update_date) THEN
NULL;
IF NOT inv_globals.equal(p_trohdr_rec.last_update_login, p_old_trohdr_rec.last_update_login) THEN
NULL;
IF NOT inv_globals.equal(p_trohdr_rec.program_update_date, p_old_trohdr_rec.program_update_date) THEN
NULL;
IF l_trohdr_rec.last_updated_by = fnd_api.g_miss_num THEN
l_trohdr_rec.last_updated_by := p_old_trohdr_rec.last_updated_by;
IF l_trohdr_rec.last_update_date = fnd_api.g_miss_date THEN
l_trohdr_rec.last_update_date := p_old_trohdr_rec.last_update_date;
IF l_trohdr_rec.last_update_login = fnd_api.g_miss_num THEN
l_trohdr_rec.last_update_login := p_old_trohdr_rec.last_update_login;
IF l_trohdr_rec.program_update_date = fnd_api.g_miss_date THEN
l_trohdr_rec.program_update_date := p_old_trohdr_rec.program_update_date;
IF l_trohdr_rec.last_updated_by = fnd_api.g_miss_num THEN
l_trohdr_rec.last_updated_by := NULL;
IF l_trohdr_rec.last_update_date = fnd_api.g_miss_date THEN
l_trohdr_rec.last_update_date := NULL;
IF l_trohdr_rec.last_update_login = fnd_api.g_miss_num THEN
l_trohdr_rec.last_update_login := NULL;
IF l_trohdr_rec.program_update_date = fnd_api.g_miss_date THEN
l_trohdr_rec.program_update_date := NULL;
PROCEDURE update_row(p_trohdr_rec IN inv_move_order_pub.trohdr_rec_type) IS
BEGIN
UPDATE mtl_txn_request_headers
SET attribute1 = p_trohdr_rec.attribute1
, attribute10 = p_trohdr_rec.attribute10
, attribute11 = p_trohdr_rec.attribute11
, attribute12 = p_trohdr_rec.attribute12
, attribute13 = p_trohdr_rec.attribute13
, attribute14 = p_trohdr_rec.attribute14
, attribute15 = p_trohdr_rec.attribute15
, attribute2 = p_trohdr_rec.attribute2
, attribute3 = p_trohdr_rec.attribute3
, attribute4 = p_trohdr_rec.attribute4
, attribute5 = p_trohdr_rec.attribute5
, attribute6 = p_trohdr_rec.attribute6
, attribute7 = p_trohdr_rec.attribute7
, attribute8 = p_trohdr_rec.attribute8
, attribute9 = p_trohdr_rec.attribute9
, attribute_category = p_trohdr_rec.attribute_category
, created_by = p_trohdr_rec.created_by
, creation_date = p_trohdr_rec.creation_date
, date_required = p_trohdr_rec.date_required
, description = p_trohdr_rec.description
, from_subinventory_code = p_trohdr_rec.from_subinventory_code
, header_id = p_trohdr_rec.header_id
, header_status = p_trohdr_rec.header_status
, last_updated_by = p_trohdr_rec.last_updated_by
, last_update_date = p_trohdr_rec.last_update_date
, last_update_login = p_trohdr_rec.last_update_login
, organization_id = p_trohdr_rec.organization_id
, program_application_id = p_trohdr_rec.program_application_id
, program_id = p_trohdr_rec.program_id
, program_update_date = p_trohdr_rec.program_update_date
, request_id = p_trohdr_rec.request_id
, request_number = p_trohdr_rec.request_number
, status_date = p_trohdr_rec.status_date
, to_account_id = p_trohdr_rec.to_account_id
, to_subinventory_code = p_trohdr_rec.to_subinventory_code
, move_order_type = p_trohdr_rec.move_order_type
, transaction_type_id = p_trohdr_rec.transaction_type_id
, ship_to_location_id = p_trohdr_rec.ship_to_location_id
WHERE header_id = p_trohdr_rec.header_id;
fnd_msg_pub.add_exc_msg(g_pkg_name, 'Update_Row');
END update_row;
PROCEDURE insert_row(p_trohdr_rec IN inv_move_order_pub.trohdr_rec_type) IS
BEGIN
INSERT INTO mtl_txn_request_headers
(
attribute1
, attribute10
, attribute11
, attribute12
, attribute13
, attribute14
, attribute15
, attribute2
, attribute3
, attribute4
, attribute5
, attribute6
, attribute7
, attribute8
, attribute9
, attribute_category
, created_by
, creation_date
, date_required
, description
, from_subinventory_code
, header_id
, header_status
, last_updated_by
, last_update_date
, last_update_login
, organization_id
, program_application_id
, program_id
, program_update_date
, request_id
, request_number
, status_date
, to_account_id
, to_subinventory_code
, move_order_type
, transaction_type_id
, grouping_rule_id
, ship_to_location_id
)
VALUES (
p_trohdr_rec.attribute1
, p_trohdr_rec.attribute10
, p_trohdr_rec.attribute11
, p_trohdr_rec.attribute12
, p_trohdr_rec.attribute13
, p_trohdr_rec.attribute14
, p_trohdr_rec.attribute15
, p_trohdr_rec.attribute2
, p_trohdr_rec.attribute3
, p_trohdr_rec.attribute4
, p_trohdr_rec.attribute5
, p_trohdr_rec.attribute6
, p_trohdr_rec.attribute7
, p_trohdr_rec.attribute8
, p_trohdr_rec.attribute9
, p_trohdr_rec.attribute_category
, p_trohdr_rec.created_by
, p_trohdr_rec.creation_date
, p_trohdr_rec.date_required
, p_trohdr_rec.description
, p_trohdr_rec.from_subinventory_code
, p_trohdr_rec.header_id
, p_trohdr_rec.header_status
, p_trohdr_rec.last_updated_by
, p_trohdr_rec.last_update_date
, p_trohdr_rec.last_update_login
, p_trohdr_rec.organization_id
, p_trohdr_rec.program_application_id
, p_trohdr_rec.program_id
, p_trohdr_rec.program_update_date
, p_trohdr_rec.request_id
, p_trohdr_rec.request_number
, p_trohdr_rec.status_date
, p_trohdr_rec.to_account_id
, p_trohdr_rec.to_subinventory_code
, p_trohdr_rec.move_order_type
, p_trohdr_rec.transaction_type_id
, p_trohdr_rec.grouping_rule_id
, p_trohdr_rec.ship_to_location_id
);
fnd_msg_pub.add_exc_msg(g_pkg_name, 'Insert_Row');
END insert_row;
PROCEDURE delete_row(p_header_id IN NUMBER) IS
BEGIN
DELETE FROM mtl_txn_request_headers
WHERE header_id = p_header_id;
fnd_msg_pub.add_exc_msg(g_pkg_name, 'Delete_Row');
END delete_row;
PROCEDURE update_row_status(p_header_id IN NUMBER, p_status IN NUMBER) IS
l_trohdr_rec inv_move_order_pub.trohdr_rec_type;
l_trohdr_rec.last_update_date := SYSDATE;
l_trohdr_rec.last_updated_by := fnd_global.user_id;
l_trohdr_rec.last_update_login := fnd_global.login_id;
inv_trohdr_util.update_row(l_trohdr_rec);
fnd_msg_pub.add_exc_msg(g_pkg_name, 'Update_Row_Status');
END update_row_status;
SELECT attribute1
, attribute10
, attribute11
, attribute12
, attribute13
, attribute14
, attribute15
, attribute2
, attribute3
, attribute4
, attribute5
, attribute6
, attribute7
, attribute8
, attribute9
, attribute_category
, created_by
, creation_date
, date_required
, description
, from_subinventory_code
, header_id
, header_status
, last_updated_by
, last_update_date
, last_update_login
, organization_id
, program_application_id
, program_id
, program_update_date
, request_id
, request_number
, status_date
, to_account_id
, to_subinventory_code
, move_order_type
, transaction_type_id
, grouping_rule_id
, ship_to_location_id
INTO l_trohdr_rec.attribute1
, l_trohdr_rec.attribute10
, l_trohdr_rec.attribute11
, l_trohdr_rec.attribute12
, l_trohdr_rec.attribute13
, l_trohdr_rec.attribute14
, l_trohdr_rec.attribute15
, l_trohdr_rec.attribute2
, l_trohdr_rec.attribute3
, l_trohdr_rec.attribute4
, l_trohdr_rec.attribute5
, l_trohdr_rec.attribute6
, l_trohdr_rec.attribute7
, l_trohdr_rec.attribute8
, l_trohdr_rec.attribute9
, l_trohdr_rec.attribute_category
, l_trohdr_rec.created_by
, l_trohdr_rec.creation_date
, l_trohdr_rec.date_required
, l_trohdr_rec.description
, l_trohdr_rec.from_subinventory_code
, l_trohdr_rec.header_id
, l_trohdr_rec.header_status
, l_trohdr_rec.last_updated_by
, l_trohdr_rec.last_update_date
, l_trohdr_rec.last_update_login
, l_trohdr_rec.organization_id
, l_trohdr_rec.program_application_id
, l_trohdr_rec.program_id
, l_trohdr_rec.program_update_date
, l_trohdr_rec.request_id
, l_trohdr_rec.request_number
, l_trohdr_rec.status_date
, l_trohdr_rec.to_account_id
, l_trohdr_rec.to_subinventory_code
, l_trohdr_rec.move_order_type
, l_trohdr_rec.transaction_type_id
, l_trohdr_rec.grouping_rule_id
, l_trohdr_rec.ship_to_location_id
FROM mtl_txn_request_headers
WHERE header_id = p_header_id;
SELECT attribute1
, attribute10
, attribute11
, attribute12
, attribute13
, attribute14
, attribute15
, attribute2
, attribute3
, attribute4
, attribute5
, attribute6
, attribute7
, attribute8
, attribute9
, attribute_category
, created_by
, creation_date
, date_required
, description
, from_subinventory_code
, header_id
, header_status
, last_updated_by
, last_update_date
, last_update_login
, organization_id
, program_application_id
, program_id
, program_update_date
, request_id
, request_number
, status_date
, to_account_id
, to_subinventory_code
, move_order_type
, transaction_type_id
, grouping_rule_id
, ship_to_location_id
INTO l_trohdr_rec.attribute1
, l_trohdr_rec.attribute10
, l_trohdr_rec.attribute11
, l_trohdr_rec.attribute12
, l_trohdr_rec.attribute13
, l_trohdr_rec.attribute14
, l_trohdr_rec.attribute15
, l_trohdr_rec.attribute2
, l_trohdr_rec.attribute3
, l_trohdr_rec.attribute4
, l_trohdr_rec.attribute5
, l_trohdr_rec.attribute6
, l_trohdr_rec.attribute7
, l_trohdr_rec.attribute8
, l_trohdr_rec.attribute9
, l_trohdr_rec.attribute_category
, l_trohdr_rec.created_by
, l_trohdr_rec.creation_date
, l_trohdr_rec.date_required
, l_trohdr_rec.description
, l_trohdr_rec.from_subinventory_code
, l_trohdr_rec.header_id
, l_trohdr_rec.header_status
, l_trohdr_rec.last_updated_by
, l_trohdr_rec.last_update_date
, l_trohdr_rec.last_update_login
, l_trohdr_rec.organization_id
, l_trohdr_rec.program_application_id
, l_trohdr_rec.program_id
, l_trohdr_rec.program_update_date
, l_trohdr_rec.request_id
, l_trohdr_rec.request_number
, l_trohdr_rec.status_date
, l_trohdr_rec.to_account_id
, l_trohdr_rec.to_subinventory_code
, l_trohdr_rec.move_order_type
, l_trohdr_rec.transaction_type_id
, l_trohdr_rec.grouping_rule_id
, l_trohdr_rec.ship_to_location_id
FROM mtl_txn_request_headers
WHERE header_id = p_trohdr_rec.header_id
FOR UPDATE NOWAIT;
AND inv_globals.equal(p_trohdr_rec.last_updated_by, l_trohdr_rec.last_updated_by)
AND inv_globals.equal(p_trohdr_rec.last_update_date, l_trohdr_rec.last_update_date)
AND inv_globals.equal(p_trohdr_rec.last_update_login, l_trohdr_rec.last_update_login)
AND inv_globals.equal(p_trohdr_rec.organization_id, l_trohdr_rec.organization_id)
AND inv_globals.equal(p_trohdr_rec.program_application_id, l_trohdr_rec.program_application_id)
AND inv_globals.equal(p_trohdr_rec.program_id, l_trohdr_rec.program_id)
AND inv_globals.equal(p_trohdr_rec.program_update_date, l_trohdr_rec.program_update_date)
AND inv_globals.equal(p_trohdr_rec.request_id, l_trohdr_rec.request_id)
AND inv_globals.equal(p_trohdr_rec.request_number, l_trohdr_rec.request_number)
AND inv_globals.equal(p_trohdr_rec.status_date, l_trohdr_rec.status_date)
AND inv_globals.equal(p_trohdr_rec.to_account_id, l_trohdr_rec.to_account_id)
AND inv_globals.equal(p_trohdr_rec.to_subinventory_code, l_trohdr_rec.to_subinventory_code)
AND inv_globals.equal(p_trohdr_rec.move_order_type, l_trohdr_rec.move_order_type)
AND inv_globals.equal(p_trohdr_rec.transaction_type_id, l_trohdr_rec.transaction_type_id)
AND inv_globals.equal(p_trohdr_rec.grouping_rule_id, l_trohdr_rec.grouping_rule_id)
AND inv_globals.equal(p_trohdr_rec.ship_to_location_id, l_trohdr_rec.ship_to_location_id) THEN
-- Row has not changed. Set out parameter.
x_trohdr_rec := l_trohdr_rec;
fnd_message.set_name('INV', 'OE_LOCK_ROW_DELETED');