The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_last_updated_by number;
x_last_update_login number;
x_last_updated_by := FND_GLOBAL.USER_ID;
x_last_update_login := FND_GLOBAL.LOGIN_ID;
/* For Bug 3087964, inserting ready_to_compile_flag with value of 'Y' as default.
otherwise the schedule will not get compiled.
Inserting only those multipliers with ready_to_compile_flag <> 'X'.
Also added the statement to delete multipliers with ready_to_compile_flag as 'X'
prior to insertion. */
delete from pa_ind_cost_multipliers
where
ind_rate_sch_revision_id = x_ind_rate_sch_rev_id_to
and ready_to_compile_flag = 'X';
insert into pa_ind_cost_multipliers (ind_rate_sch_revision_id,
organization_id,
ind_cost_code,
multiplier,
last_update_date,
last_updated_by,
created_by,
creation_date,
last_update_login,
ready_to_compile_flag)
select x_ind_rate_sch_rev_id_to,
m.organization_id,
m.ind_cost_code,
m.multiplier,
SYSDATE,
x_last_updated_by,
x_created_by,
SYSDATE,
x_last_update_login,
'Y'
from pa_ind_cost_multipliers m
where m.ind_rate_sch_revision_id = x_ind_rate_sch_rev_id_from
and nvl(m.ready_to_compile_flag, 'N') <> 'X';
insert into pa_ind_cost_multipliers (ind_rate_sch_revision_id,
organization_id,
ind_cost_code,
multiplier,
last_update_date,
last_updated_by,
created_by,
creation_date,
last_update_login,
ready_to_compile_flag)
select x_ind_rate_sch_rev_id_to,
m.organization_id,
m.ind_cost_code,
m.multiplier,
SYSDATE,
x_last_updated_by,
x_created_by,
SYSDATE,
x_last_update_login,
'Y'
from pa_ind_cost_multipliers m
where m.ind_rate_sch_revision_id = x_ind_rate_sch_rev_id_from
and nvl(m.ready_to_compile_flag, 'N') <> 'X';
select 1
into x_dummy
from sys.dual
where not exists
(select 1
from pa_ind_cost_multipliers m
where m.ind_rate_sch_revision_id =
x_ind_rate_sch_revision_id
and nvl(m.ready_to_compile_flag,'N') <> 'X');