The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT AMS_TEMPL_RESPONSIBILITY_s.NEXTVAL
FROM dual;
SELECT 1
FROM AMS_TEMPL_RESPONSIBILITY
WHERE TEMPL_RESPONSIBILITY_ID = l_id;
INSERT INTO AMS_TEMPL_RESPONSIBILITY(
templ_responsibility_id,
template_id,
responsibility_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
object_version_number,
last_update_login
) VALUES (
l_templ_responsibility_id,
DECODE( p_template_res_rec.template_id, FND_API.g_miss_num, NULL, p_template_res_rec.template_id),
DECODE( p_template_res_rec.responsibility_id, FND_API.g_miss_num, NULL, p_template_res_rec.responsibility_id),
sysdate,
fnd_global.user_id,
sysdate,
fnd_global.user_id,
1,
FND_GLOBAL.CONC_LOGIN_ID
);
PROCEDURE Update_template_res(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_template_res_rec IN template_res_rec_type
)
IS
CURSOR c_get_template_res(p_templ_responsibility_id NUMBER) IS
SELECT *
FROM AMS_TEMPL_RESPONSIBILITY
WHERE templ_responsibility_id = p_templ_responsibility_id;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_template_res';
SAVEPOINT UPDATE_template_res_PVT;
AMS_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
AMS_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
p_token_name => 'INFO',
p_token_value => 'template_res') ;
p_token_value => 'Last_Update_Date') ;
p_validation_mode => JTF_PLSQL_API.g_update,
p_template_res_rec => p_template_res_rec,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
Update AMS_TEMPL_RESPONSIBILITY
SET templ_responsibility_id = DECODE( p_template_res_rec.templ_responsibility_id, FND_API.g_miss_num, templ_responsibility_id, p_template_res_rec.templ_responsibility_id),
template_id = DECODE( p_template_res_rec.template_id, FND_API.g_miss_num, template_id, p_template_res_rec.template_id),
responsibility_id = DECODE( p_template_res_rec.responsibility_id, FND_API.g_miss_num, responsibility_id, p_template_res_rec.responsibility_id),
last_update_date = sysdate,
last_updated_by = fnd_global.user_id,
object_version_number = p_template_res_rec.object_version_number + 1,
last_update_login = FND_GLOBAL.CONC_LOGIN_ID
WHERE TEMPL_RESPONSIBILITY_ID = p_template_res_rec.templ_responsibility_id
AND object_version_number = p_template_res_rec.object_version_number;
ROLLBACK TO UPDATE_template_res_PVT;
ROLLBACK TO UPDATE_template_res_PVT;
ROLLBACK TO UPDATE_template_res_PVT;
End Update_template_res;
PROCEDURE Delete_template_res(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_templ_responsibility_id IN NUMBER,
p_object_version_number IN NUMBER
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'Delete_template_res';
SAVEPOINT DELETE_template_res_PVT;
DELETE FROM AMS_TEMPL_RESPONSIBILITY
WHERE TEMPL_RESPONSIBILITY_ID = p_TEMPL_RESPONSIBILITY_ID;
ROLLBACK TO DELETE_template_res_PVT;
ROLLBACK TO DELETE_template_res_PVT;
ROLLBACK TO DELETE_template_res_PVT;
End Delete_template_res;
SELECT TEMPL_RESPONSIBILITY_ID
FROM AMS_TEMPL_RESPONSIBILITY
WHERE TEMPL_RESPONSIBILITY_ID = p_TEMPL_RESPONSIBILITY_ID
AND object_version_number = p_object_version
FOR UPDATE NOWAIT;
SELECT *
FROM ams_templ_responsibility
WHERE templ_responsibility_id = p_template_res_rec.templ_responsibility_id;
IF p_template_res_rec.last_update_date = FND_API.g_miss_date THEN
x_complete_rec.last_update_date := l_template_res_rec.last_update_date;
IF p_template_res_rec.last_updated_by = FND_API.g_miss_num THEN
x_complete_rec.last_updated_by := l_template_res_rec.last_updated_by;
IF p_template_res_rec.last_update_login = FND_API.g_miss_num THEN
x_complete_rec.last_update_login := l_template_res_rec.last_update_login;