The following lines contain the word 'select', 'insert', 'update' or 'delete':
select null from pay_upgrade_legislations
where upgrade_definition_id = p_upgrade_definition_id
and legislation_code = p_legislation_code ;
select legislatively_enabled
from pay_upgrade_definitions
where upgrade_definition_id = p_upgrade_definition_id ;
select null
from fnd_territories
where territory_code = p_legislation_code ;
PROCEDURE chk_delete ( p_upgrade_definition_id in number
,p_legislation_code in varchar2 )
is
--
cursor csr_delete is
select null from pay_upgrade_status
where
upgrade_definition_id = p_upgrade_definition_id
and (
( legislation_code is not null and legislation_code = p_legislation_code )
or ( business_group_id is not null and p_legislation_code = hr_api.return_legislation_code(business_group_id) ) );
l_proc varchar2(100) := g_package || 'chk_delete';
open csr_delete;
fetch csr_delete into l_exists ;
if csr_delete%found then
close csr_delete;
close csr_delete;
END chk_delete;
PROCEDURE Insert_Row (
P_UPGRADE_DEFINITION_ID in NUMBER
,P_LEGISLATION_CODE in VARCHAR2
,P_LAST_UPDATE_DATE in DATE
,P_LAST_UPDATED_BY in NUMBER
,P_LAST_UPDATE_LOGIN in NUMBER
,P_CREATED_BY in NUMBER
,P_CREATION_DATE in DATE
) is
--
l_exists varchar2(1);
l_proc varchar2(100) := g_package || 'Insert_Row';
select null from PAY_UPGRADE_LEGISLATIONS
where upgrade_definition_id = p_upgrade_definition_id
and legislation_code = p_legislation_code;
insert into PAY_UPGRADE_LEGISLATIONS (
UPGRADE_DEFINITION_ID,
LEGISLATION_CODE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
) values (
p_upgrade_definition_id,
p_legislation_code,
p_creation_date,
p_created_by,
p_last_update_date,
p_last_updated_by,
p_last_update_login );
END Insert_Row;
select null
from PAY_UPGRADE_LEGISLATIONS
where UPGRADE_DEFINITION_ID = P_UPGRADE_DEFINITION_ID
and LEGISLATION_CODE = P_LEGISLATION_CODE
for update of UPGRADE_DEFINITION_ID nowait;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE Delete_Row (
P_UPGRADE_DEFINITION_ID in NUMBER
,P_LEGISLATION_CODE in VARCHAR2
)is
--
l_proc varchar2(100) := g_package || 'Delete_Row';
chk_delete ( p_upgrade_definition_id , p_legislation_code );
delete from PAY_UPGRADE_LEGISLATIONS
where UPGRADE_DEFINITION_ID = P_UPGRADE_DEFINITION_ID
and LEGISLATION_CODE = P_LEGISLATION_CODE ;
END Delete_Row;
l_last_updated_by PAY_UPGRADE_LEGISLATIONS.LAST_UPDATED_BY%TYPE;
l_last_update_login PAY_UPGRADE_LEGISLATIONS.LAST_UPDATE_LOGIN%TYPE;
l_last_update_date PAY_UPGRADE_LEGISLATIONS.LAST_UPDATE_DATE%TYPE;
select pul.upgrade_definition_id
from pay_upgrade_definitions pud, pay_upgrade_legislations pul
where upper(pud.short_name) = upper(p_short_name)
and pud.upgrade_definition_id = pul.upgrade_definition_id
and pul.legislation_code = p_legislation_code;
select pud.upgrade_definition_id
from pay_upgrade_definitions pud
where upper(pud.short_name) = upper(p_short_name);
l_last_update_date := l_sysdate;
l_last_updated_by := fnd_global.user_id;
l_last_update_login := fnd_global.login_id;
Insert_Row (
P_UPGRADE_DEFINITION_ID => l_upgrade_definition_id
,P_LEGISLATION_CODE => p_legislation_code
,P_LAST_UPDATE_DATE => l_last_update_date
,P_LAST_UPDATED_BY => l_last_updated_by
,P_LAST_UPDATE_LOGIN => l_last_update_login
,P_CREATED_BY => l_created_by
,P_CREATION_DATE => l_creation_date
);