The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 1
FROM dual
WHERE EXISTS(SELECT 1
FROM gl_periods_v
WHERE period_set_name = p_threshold_calendar);
SELECT start_date, end_date
FROM gl_periods_v
WHERE period_set_name = p_threshold_calendar
AND period_name = p_start_period_name;
SELECT start_date, end_date
FROM gl_periods_v
WHERE period_set_name = p_threshold_calendar
AND period_name = p_end_period_name;
SELECT start_date, end_date
FROM ozf_threshold_rules_all
WHERE threshold_id = p_threshold_id;
SELECT OZF_THRESHOLDS_s.NEXTVAL
FROM dual;
SELECT 1 FROM dual
WHERE EXISTS (SELECT 1 FROM OZF_THRESHOLDS_ALL_B
WHERE THRESHOLD_ID = l_id);
OZF_FUNDTHRESHOLDS_ALL_B_PKG.Insert_Row(
px_threshold_id => l_threshold_id,
p_last_update_date => SYSDATE,
p_last_updated_by =>NVL(fnd_global.user_id, -1),
p_last_update_login => NVL(fnd_global.conc_login_id, -1),
p_creation_date => SYSDATE,
p_created_by => NVL(fnd_global.user_id, -1),
p_created_from => p_threshold_rec.created_from,
p_request_id => fnd_global.conc_request_id,
p_program_application_id => fnd_global.prog_appl_id,
p_program_id => fnd_global.conc_program_id,
p_program_update_date => SYSDATE,
p_threshold_calendar =>l_threshold_calendar,
p_start_period_name => p_threshold_rec.start_period_name,
p_end_period_name => p_threshold_rec.end_period_name,
p_start_date_active => p_threshold_rec.start_date_active,
p_end_date_active => p_threshold_rec.end_date_active,
p_owner => NVL(p_threshold_rec.owner, NVL(fnd_global.user_id, -1)),
p_enable_flag => p_threshold_rec.enable_flag,
p_attribute_category => p_threshold_rec.attribute_category,
p_attribute1 => p_threshold_rec.attribute1,
p_attribute2 => p_threshold_rec.attribute2,
p_attribute3 => p_threshold_rec.attribute3,
p_attribute4 => p_threshold_rec.attribute4,
p_attribute5 => p_threshold_rec.attribute5,
p_attribute6 => p_threshold_rec.attribute6,
p_attribute7 => p_threshold_rec.attribute7,
p_attribute8 => p_threshold_rec.attribute8,
p_attribute9 => p_threshold_rec.attribute9,
p_attribute10 => p_threshold_rec.attribute10,
p_attribute11 => p_threshold_rec.attribute11,
p_attribute12 => p_threshold_rec.attribute12,
p_attribute13 => p_threshold_rec.attribute13,
p_attribute14 => p_threshold_rec.attribute14,
p_attribute15 => p_threshold_rec.attribute15,
p_org_id => TO_NUMBER(SUBSTRB(USERENV('CLIENT_INFO'), 1, 10)),
p_security_group_id => p_threshold_rec.security_group_id,
px_object_version_number => l_object_version_number,
p_name => p_threshold_rec.name,
p_description => p_threshold_rec.description,
p_language => USERENV('LANG'),
p_source_lang => p_threshold_rec.source_lang,
p_threshold_type => p_threshold_rec.threshold_type
);
PROCEDURE Update_Threshold(
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_threshold_rec IN threshold_rec_type,
x_object_version_number OUT NOCOPY NUMBER
)
IS
CURSOR c_get_threshold(threshold_id NUMBER) IS
SELECT *
FROM OZF_THRESHOLDS_ALL_B
WHERE THRESHOLD_ID = threshold_id
AND object_version_number = p_threshold_rec.object_version_number;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Threshold';
SAVEPOINT UPDATE_Threshold_PVT;
OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select '|| p_threshold_rec.THRESHOLD_ID);
OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
p_token_name => 'INFO',
p_token_value => 'Threshold') ;
p_token_value => 'Last_Update_Date') ;
p_validation_mode => JTF_PLSQL_API.g_update,
x_return_status => x_return_status
);
OZF_UTILITY_PVT.debug_message('Private API: Calling update table handler');
OZF_FUNDTHRESHOLDS_ALL_B_PKG.Update_Row(
p_threshold_id => l_threshold_rec.threshold_id,
p_last_update_date => SYSDATE,
p_last_updated_by => NVL(fnd_global.user_id, -1),
p_last_update_login => NVL(fnd_global.conc_login_id, -1),
p_created_from => l_threshold_rec.created_from,
p_request_id => fnd_global.conc_request_id,
p_program_application_id => fnd_global.prog_appl_id,
p_program_id => fnd_global.conc_program_id,
p_program_update_date => SYSDATE,
p_threshold_calendar =>p_threshold_rec.threshold_calendar,
p_start_period_name => l_threshold_rec.start_period_name,
p_end_period_name => l_threshold_rec.end_period_name,
p_start_date_active => l_threshold_rec.start_date_active,
p_end_date_active => l_threshold_rec.end_date_active,
p_owner => l_threshold_rec.owner,
p_enable_flag => l_threshold_rec.enable_flag,
p_attribute_category => l_threshold_rec.attribute_category,
p_attribute1 => l_threshold_rec.attribute1,
p_attribute2 => l_threshold_rec.attribute2,
p_attribute3 => l_threshold_rec.attribute3,
p_attribute4 => l_threshold_rec.attribute4,
p_attribute5 => l_threshold_rec.attribute5,
p_attribute6 => l_threshold_rec.attribute6,
p_attribute7 => l_threshold_rec.attribute7,
p_attribute8 => l_threshold_rec.attribute8,
p_attribute9 => l_threshold_rec.attribute9,
p_attribute10 => l_threshold_rec.attribute10,
p_attribute11 => l_threshold_rec.attribute11,
p_attribute12 => l_threshold_rec.attribute12,
p_attribute13 => l_threshold_rec.attribute13,
p_attribute14 => l_threshold_rec.attribute14,
p_attribute15 => l_threshold_rec.attribute15,
p_org_id => l_threshold_rec.org_id,
p_security_group_id => l_threshold_rec.security_group_id,
px_object_version_number => l_object_version_number,
p_name => l_threshold_rec.name,
p_description => l_threshold_rec.description,
p_language => l_threshold_rec.language,
p_source_lang => l_threshold_rec.source_lang,
p_threshold_type => p_threshold_rec.threshold_type
);
ROLLBACK TO UPDATE_Threshold_PVT;
ROLLBACK TO UPDATE_Threshold_PVT;
ROLLBACK TO UPDATE_Threshold_PVT;
End Update_Threshold;
PROCEDURE Delete_Threshold(
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_threshold_id IN NUMBER,
p_object_version_number IN NUMBER
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'Delete_Threshold';
SAVEPOINT DELETE_Threshold_PVT;
OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
OZF_FUNDTHRESHOLDS_ALL_B_PKG.Delete_Row(
p_THRESHOLD_ID => p_THRESHOLD_ID);
ROLLBACK TO DELETE_Threshold_PVT;
ROLLBACK TO DELETE_Threshold_PVT;
ROLLBACK TO DELETE_Threshold_PVT;
End Delete_Threshold;
SELECT THRESHOLD_ID
FROM OZF_THRESHOLDS_ALL_B
WHERE THRESHOLD_ID = p_THRESHOLD_ID
AND object_version_number = p_object_version
FOR UPDATE NOWAIT;
IF p_threshold_rec.last_update_date = FND_API.g_miss_date OR p_threshold_rec.last_update_date IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_NO_last_upd_date');
IF p_threshold_rec.last_updated_by = FND_API.g_miss_num OR p_threshold_rec.last_updated_by IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_NO_last_upd_by');
IF p_threshold_rec.last_update_date IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_NO_last_upd_date');
IF p_threshold_rec.last_updated_by IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_NO_last_upd_by');
SELECT *
FROM ozf_thresholds_all_b
WHERE threshold_id = p_threshold_rec.threshold_id;
IF p_threshold_rec.last_update_date = FND_API.g_miss_date THEN
x_complete_rec.last_update_date := NULL;
IF p_threshold_rec.last_update_date IS NULL THEN
x_complete_rec.last_update_date := l_threshold_rec.last_update_date;
IF p_threshold_rec.last_updated_by = FND_API.g_miss_num THEN
x_complete_rec.last_updated_by := NULL;
IF p_threshold_rec.last_updated_by IS NULL THEN
x_complete_rec.last_updated_by := l_threshold_rec.last_updated_by;
IF p_threshold_rec.last_update_login = FND_API.g_miss_num THEN
x_complete_rec.last_update_login := NULL;
IF p_threshold_rec.last_update_login IS NULL THEN
x_complete_rec.last_update_login := l_threshold_rec.last_update_login;
IF p_threshold_rec.program_update_date = FND_API.g_miss_date THEN
x_complete_rec.program_update_date := NULL;
IF p_threshold_rec.program_update_date IS NULL THEN
x_complete_rec.program_update_date := l_threshold_rec.program_update_date;