The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure INSERT_ROW (
X_ROWID in out nocopy VARCHAR2,
X_METHOD_ID in NUMBER,
X_YEAR in NUMBER,
X_PERIOD_PLACED_IN_SERVICE in NUMBER,
X_RATE in NUMBER,
X_CREATION_DATE in DATE,
X_CREATED_BY in NUMBER,
X_LAST_UPDATE_DATE in DATE,
X_LAST_UPDATED_BY in NUMBER,
X_LAST_UPDATE_LOGIN in NUMBER,
p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) is
CURSOR C is SELECT rowid FROM fa_rates
where method_id = X_Method_Id
and year = X_Year
and period_placed_in_service = X_Period_Placed_In_Service;
INSERT INTO fa_rates (
method_id,
year,
period_placed_in_service,
rate,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
) VALUES (
X_Method_ID,
X_Year,
X_Period_Placed_In_Service,
X_Rate,
X_Creation_Date,
X_Created_By,
X_Last_Update_Date,
X_Last_Updated_By,
X_Last_Update_Login
);
calling_fn => 'fa_rates.insert_row'
,p_log_level_rec => p_log_level_rec);
end INSERT_ROW;
SELECT method_id,
year,
period_placed_in_service,
rate
FROM fa_rates
where method_id = X_Method_Id
and year = X_Year
and period_placed_in_service = X_Period_Placed_In_Service
FOR UPDATE of method_id, year, period_placed_in_service NOWAIT;
FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
procedure UPDATE_ROW (
X_METHOD_ID in NUMBER,
X_YEAR in NUMBER,
X_PERIOD_PLACED_IN_SERVICE in NUMBER,
X_RATE in NUMBER,
X_LAST_UPDATE_DATE in DATE,
X_LAST_UPDATED_BY in NUMBER,
X_LAST_UPDATE_LOGIN in NUMBER,
p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) is
begin
UPDATE fa_rates
SET method_id = X_Method_ID,
year = X_Year,
period_placed_in_service= X_Period_Placed_In_Service,
rate = X_Rate,
last_update_date = X_Last_Update_Date,
last_updated_by = X_Last_Updated_By,
last_update_login = X_Last_Update_Login
where method_id = X_Method_Id
and year = X_Year
and period_placed_in_service = X_Period_Placed_In_Service;
calling_fn => 'fa_rates_pkg.update_row'
,p_log_level_rec => p_log_level_rec);
end UPDATE_ROW;
procedure DELETE_ROW (
X_METHOD_ID in NUMBER,
X_YEAR in NUMBER,
X_PERIOD_PLACED_IN_SERVICE in NUMBER,
p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) is
begin
DELETE FROM fa_rates
where method_id = X_Method_Id
and year = X_Year
and period_placed_in_service = X_Period_Placed_In_Service;
calling_fn => 'fa_rates_pkg.delete_row'
,p_log_level_rec => p_log_level_rec);
end DELETE_ROW;
X_DB_LAST_UPDATED_BY NUMBER,
X_DB_LAST_UPDATE_DATE DATE,
X_OWNER in VARCHAR2,
X_LAST_UPDATE_DATE in DATE,
X_YEAR in NUMBER,
X_PERIOD_PLACED_IN_SERVICE in NUMBER,
X_RATE in NUMBER,
p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) is
h_record_exists number(15);
select count(*)
into h_record_exists
from fa_rates
where method_id = X_Method_ID
and year = X_Year
and period_placed_in_service = X_Period_Placed_In_Service;
if (fnd_load_util.upload_test(user_id, x_last_update_date,
x_db_last_updated_by, x_db_last_update_date,
X_CUSTOM_MODE)) then
fa_rates_pkg.update_row (
X_Method_ID => X_Method_ID,
X_Year => X_Year,
X_Period_Placed_In_Service => X_Period_Placed_In_Service,
X_Rate => X_Rate,
X_Last_Update_Date => sysdate,
X_Last_Updated_By => user_id,
X_Last_Update_Login => 0
,p_log_level_rec => p_log_level_rec);
fa_rates_pkg.insert_row (
X_Rowid => row_id,
X_Method_Id => X_Method_Id,
X_Year => X_Year,
X_Period_Placed_In_Service => X_Period_Placed_In_Service,
X_Rate => X_Rate,
X_Creation_Date => sysdate,
X_Created_By => user_id,
X_Last_Update_Date => sysdate,
X_Last_Updated_By => user_id,
X_Last_Update_Login => 0
,p_log_level_rec => p_log_level_rec);
x_last_update_date IN DATE,
x_year IN NUMBER,
x_period_placed_in_service IN NUMBER,
x_rate IN NUMBER) IS
methods_err exception;
h_last_update_date date;
h_last_updated_by number;
h_last_update_date := fa_cache_pkg.fazccmt_record.last_update_date;
h_last_updated_by := fa_cache_pkg.fazccmt_record.last_updated_by;
x_db_last_update_date => h_last_update_date,
x_db_last_updated_by => h_last_updated_by,
x_owner => x_owner,
x_last_update_date => x_last_update_date,
x_year => x_year,
x_period_placed_in_service => x_period_placed_in_service,
x_rate => x_rate);
calling_fn => 'update fa_flat_rates');