The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT name
FROM fnd_currencies_vl
WHERE currency_code = p_uom
AND enabled_flag = 'Y'
AND p_effective_date BETWEEN nvl(start_date_active,p_effective_date) AND nvl(end_date_active,p_effective_date);
SELECT meaning
FROM hr_lookups
WHERE lookup_type= 'BEN_NNMNTRY_UOM'
AND lookup_code=p_nnmntry_uom
AND enabled_flag = 'Y'
AND p_effective_date BETWEEN nvl(start_date_active,p_effective_date) AND nvl(end_date_active,p_effective_date);
SELECT lf_evt_ocrd_dt
FROM ben_ptnl_ler_for_per ptn
WHERE ptn.person_id = p_person_id
AND ptn.business_group_id = p_business_group_id
AND ptn.ler_id IN ( SELECT ler_id FROM ben_ler_f ler WHERE ler.typ_cd NOT IN ('COMP','SCHEDDU','SCHEDDO'))
AND ptn.ptnl_ler_for_per_stat_cd NOT IN('VOIDD','PROCD');
SELECT ptn.ler_id,ler.name,ler.ovridg_le_flag
FROM ben_ptnl_ler_for_per ptn,
ben_ler_f ler
WHERE ptn.person_id = p_person_id
AND ptn.business_group_id = p_business_group_id
AND ptn.ler_id =ler.ler_id
AND p_effective_date between ler.effective_start_date and effective_end_date
AND ler.typ_cd NOT IN ('COMP','SCHEDDU','SCHEDDO')
AND ptn.ptnl_ler_for_per_stat_cd NOT IN('VOIDD','PROCD');
g_hierarchy.DELETE;
UPDATE ben_ptnl_ler_for_per
SET ptnl_ler_for_per_stat_cd = 'VOIDD'
WHERE person_id = p_person_id
AND business_group_id = p_business_group_id
AND ler_id in ( select ler_id from ben_ler_f ler where ler.typ_cd NOT IN ('COMP','SCHEDDU','SCHEDDO'))
AND lf_evt_ocrd_dt <= p_effective_date
AND ptnl_ler_for_per_stat_cd IN ('UNPROCD', 'DTCTD'); -- 5763776 Removed 'PROCD'. Should not require this.
UPDATE ben_per_in_ler
SET per_in_ler_stat_cd = 'VOIDD'
,voidd_dt = p_effective_date
WHERE person_id = p_person_id
AND business_group_id = p_business_group_id
AND ler_id in ( select ler_id from ben_ler_f ler where ler.typ_cd NOT IN ('COMP','SCHEDDU','SCHEDDO'))
AND per_in_ler_stat_cd = 'STRTD';
UPDATE ben_ptnl_ler_for_per
SET ptnl_ler_for_per_stat_cd = 'VOIDD'
WHERE person_id = p_person_id
AND business_group_id = p_business_group_id
AND ler_id in ( select ler_id from ben_ler_f ler where ler.typ_cd NOT IN ('COMP','SCHEDDU','SCHEDDO')
and ler.ler_id <> p_winning_ler_id)
AND lf_evt_ocrd_dt <= p_effective_date
AND ptnl_ler_for_per_stat_cd IN ('UNPROCD', 'DTCTD');
select trs.transaction_step_id
,trs.api_name
from hr_api_transaction_steps trs
where trs.transaction_id = p_transaction_id
and trs.object_type is null
and trs.api_name not in ('BEN_PROCESS_COMPENSATION_W.PROCESS_API')
order by trs.processing_order, trs.transaction_step_id;
select transaction_step_id
,api_name
from hr_api_transaction_steps
where transaction_id = p_transaction_id
order by transaction_step_id, api_name;
select datatype
,name
,varchar2_value
,number_value
,date_value
from hr_api_transaction_values
where transaction_step_id = c_transaction_step_id
order by transaction_value_id, datatype;
select ler.ler_id
from ben_ler_f ler
where ler.typ_cd = p_typ_cd
and ler.business_group_id = p_business_group_id
and p_effective_date between
ler.effective_start_date and ler.effective_end_date;
select date_of_birth,original_date_of_hire hire_date
from per_all_people_f
where person_id = p_person_id
and business_group_id = p_business_group_id
and p_effective_date between
effective_start_date and effective_end_date;
Select meaning
From hr_lookups
Where lookup_code=c_lookup_cd
and lookup_type='BEN_TM_UOM';
SELECT val
FROM ben_enrt_bnft
WHERE elig_per_elctbl_chc_id = p_elig_per_elctbl_chc_id
AND business_group_id = p_business_group_id
AND bnft_typ_cd = 'CVG' ;
Select Meaning
From hr_lookups
Where lookup_type='BEN_SS_DRVD_LABELS'
and lookup_code='COBJ';
Select pil.per_in_ler_id,
ler.name name,
ler.ler_id
From ben_per_in_ler pil,
ben_ler_f ler
Where pil.person_id = p_person_id
AND ler.ler_id = pil.ler_id
AND p_effective_date BETWEEN ler.effective_start_date and ler.effective_end_date
AND pil.per_in_ler_stat_cd IN ('STRTD', 'PROCD')
AND pil.lf_evt_ocrd_dt <= p_effective_date
AND pil.business_group_id = p_business_group_id
AND ler.typ_cd NOT IN ('COMP','SCHEDDU','SCHEDDO')
ORDER BY pil.lf_evt_ocrd_dt desc, 1 desc;
Select pgm.pgm_id
,pgm.name
,pgm.pgm_uom uom
,pgm.acty_ref_perd_cd acty_ref_perd_cd
,popl.pil_elctbl_chc_popl_id
From ben_pil_elctbl_chc_popl popl,
ben_pgm_f pgm
Where popl.per_in_ler_id = p_per_in_ler_id
and popl.pgm_id =pgm.pgm_id
and p_effective_date between pgm.effective_start_date and pgm.effective_end_date;
Select distinct pt.pl_typ_id,
pt.name
From ben_pl_typ_f pt,
ben_elig_per_elctbl_chc epe,
ben_pil_elctbl_chc_popl popl
Where pt.pl_typ_id = epe.pl_typ_id
and popl.per_in_ler_id = p_per_in_ler_id
and popl.pil_elctbl_chc_popl_id = epe.pil_elctbl_chc_popl_id
and epe.comp_lvl_cd = 'PLAN'
and popl.pl_id = epe.pl_id
and p_effective_date between pt.effective_start_date and pt.effective_end_date;
Select pt.pl_typ_id
,pt.name
,epe.ptip_id
From ben_elig_per_elctbl_chc epe,
ben_pl_typ_f pt
Where epe.pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
and epe.pl_typ_id = pt.pl_typ_id
and epe.comp_lvl_cd = 'PLAN'
and p_effective_date between pt.effective_start_date and pt.effective_end_date;*/
Select pt.pl_typ_id,
pt.name,
ptip.ptip_id
From ben_pl_typ_f pt,
ben_ptip_f ptip
Where
ptip.pl_typ_id=pt.pl_typ_id
and pt.pl_typ_id in ( Select epe.pl_typ_id
From ben_elig_per_elctbl_chc epe
Where epe.pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
and epe.comp_lvl_cd = 'PLAN'
and epe.pgm_id=ptip.pgm_id
)
and p_effective_date between pt.effective_start_date and pt.effective_end_date
and p_effective_date between ptip.effective_start_date and ptip.effective_end_date;
Select epe.pl_id,
epe.plip_id,
pl.name name,
pl.nip_pl_uom uom,
pl.nip_acty_ref_perd_cd acty_ref_perd_cd,
epe.elctbl_flag,
epe.elig_per_elctbl_chc_id
From ben_pl_f pl,
ben_elig_per_elctbl_chc epe
Where
epe.per_in_ler_id = p_per_in_ler_id
and epe.comp_lvl_cd = 'PLAN'
and epe.pl_id = pl.pl_id
and epe.pl_typ_id = p_pl_typ_id
and nvl(epe.pgm_id ,-1) = p_pgm_id
and p_effective_date between pl.effective_start_date and effective_end_date;
Select opt.opt_id,
oipl.oipl_id,
opt.name,
epe.elctbl_flag,
epe.elig_per_elctbl_chc_id
From ben_elig_per_elctbl_chc epe,
ben_oipl_f oipl,
ben_opt_f opt
Where epe.per_in_ler_id = p_per_in_ler_id
AND epe.plip_id = p_plip_id
AND epe.comp_lvl_cd = 'OIPL'
AND epe.oipl_id = oipl.oipl_id
AND oipl.opt_id = opt.opt_id
AND p_effective_date between oipl.effective_start_date and oipl.effective_end_date
AND p_effective_date between opt.effective_start_date and opt.effective_end_date;
Select opt.opt_id,
oipl.oipl_id,
opt.name,
epe.elctbl_flag,
epe.elig_per_elctbl_chc_id
From ben_elig_per_elctbl_chc epe,
ben_oipl_f oipl,
ben_opt_f opt
Where epe.per_in_ler_id = p_per_in_ler_id
AND epe.plip_id is NULL and epe.pl_id=p_pl_id
AND epe.comp_lvl_cd = 'OIPL'
AND epe.oipl_id = oipl.oipl_id
AND oipl.opt_id = opt.opt_id
AND p_effective_date between oipl.effective_start_date and oipl.effective_end_date
AND p_effective_date between opt.effective_start_date and opt.effective_end_date;
Select abr.name,
abr.acty_base_rt_id,
ecr.enrt_rt_id,
decode(ecr.entr_val_at_enrt_flag, 'Y', ecr.dflt_val, ecr.val) val,
ecr.cmcd_val,
ecr.cmcd_acty_ref_perd_cd,
ecr.nnmntry_uom
From ben_enrt_rt ecr,
ben_acty_base_rt_f abr
Where ecr.elig_per_elctbl_chc_id = p_elig_per_elctbl_chc_id
AND ecr.dsply_on_enrt_flag = 'Y'
AND ecr.enrt_bnft_id IS NULL
AND abr.acty_base_rt_id = ecr.acty_base_rt_id
AND p_effective_date BETWEEN abr.effective_start_date AND abr.effective_end_date
UNION ALL
Select abr.name,
abr.acty_base_rt_id,
ecr.enrt_rt_id,
decode(ecr.entr_val_at_enrt_flag, 'Y', ecr.dflt_val, ecr.val) val,
ecr.cmcd_val,
ecr.cmcd_acty_ref_perd_cd,
ecr.nnmntry_uom
From ben_enrt_rt ecr,
ben_enrt_bnft enb,
ben_acty_base_rt_f abr
Where enb.elig_per_elctbl_chc_id = p_elig_per_elctbl_chc_id
AND ecr.dsply_on_enrt_flag = 'Y'
AND enb.enrt_bnft_id = ecr.enrt_bnft_id
AND abr.acty_base_rt_id = ecr.acty_base_rt_id
AND p_effective_date between abr.effective_start_date and abr.effective_end_date;
Select Meaning
From hr_lookups
Where lookup_type='BEN_SS_DRVD_LABELS'
and lookup_code='COBJ';
Select pil.per_in_ler_id,
ler.name name,
ler.ler_id
From ben_per_in_ler pil,
ben_ler_f ler
Where pil.person_id = p_person_id
AND ler.ler_id = pil.ler_id
AND p_effective_date BETWEEN ler.effective_start_date and ler.effective_end_date
AND pil.per_in_ler_stat_cd IN ('STRTD', 'PROCD')
AND pil.lf_evt_ocrd_dt <= p_effective_date
AND pil.business_group_id = p_business_group_id
AND ler.typ_cd NOT IN ('COMP','SCHEDDU','SCHEDDO')
ORDER BY pil.lf_evt_ocrd_dt desc, 1 desc;
Select pgm.pgm_id
,pgm.name
,pgm.pgm_uom uom
,pgm.acty_ref_perd_cd acty_ref_perd_cd
,popl.pil_elctbl_chc_popl_id
From ben_pil_elctbl_chc_popl popl,
ben_pgm_f pgm
Where popl.per_in_ler_id = p_per_in_ler_id
and popl.pgm_id =pgm.pgm_id
and p_effective_date between pgm.effective_start_date and pgm.effective_end_date;
Select pt.pl_typ_id,
pt.name
From ben_pl_typ_f pt
Where pt.pl_typ_id IN ( Select epe.pl_typ_id
From ben_elig_per_elctbl_chc epe,
ben_pil_elctbl_chc_popl popl
Where popl.per_in_ler_id = p_per_in_ler_id
and popl.pil_elctbl_chc_popl_id = epe.pil_elctbl_chc_popl_id
and epe.comp_lvl_cd = 'PLAN'
and popl.pl_id = epe.pl_id
)
and p_effective_date between pt.effective_start_date and pt.effective_end_date;
Select pt.pl_typ_id
,pt.name
,epe.ptip_id
From ben_elig_per_elctbl_chc epe,
ben_pl_typ_f pt
Where epe.pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
and epe.pl_typ_id = pt.pl_typ_id
and epe.comp_lvl_cd = 'PLAN'
and p_effective_date between pt.effective_start_date and pt.effective_end_date;*/
Select pt.pl_typ_id,
pt.name,
ptip.ptip_id
From ben_pl_typ_f pt,
ben_ptip_f ptip
Where
ptip.pl_typ_id=pt.pl_typ_id
and pt.pl_typ_id in ( Select epe.pl_typ_id
From ben_elig_per_elctbl_chc epe
Where epe.pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
and epe.comp_lvl_cd = 'PLAN'
and epe.pgm_id=ptip.pgm_id
)
and p_effective_date between pt.effective_start_date and pt.effective_end_date
and p_effective_date between ptip.effective_start_date and ptip.effective_end_date;
Select epe.pl_id,
epe.plip_id,
pl.name name,
pl.nip_pl_uom uom,
pl.nip_acty_ref_perd_cd acty_ref_perd_cd,
epe.elctbl_flag,
epe.elig_per_elctbl_chc_id
From ben_pl_f pl,
ben_elig_per_elctbl_chc epe
Where
epe.per_in_ler_id = p_per_in_ler_id
and epe.comp_lvl_cd = 'PLAN'
and epe.pl_id = pl.pl_id
and epe.pl_typ_id = p_pl_typ_id
and nvl(epe.pgm_id ,-1) = p_pgm_id
and p_effective_date between pl.effective_start_date and effective_end_date;
Select opt.opt_id,
oipl.oipl_id,
opt.name,
epe.elctbl_flag,
epe.elig_per_elctbl_chc_id
From ben_elig_per_elctbl_chc epe,
ben_oipl_f oipl,
ben_opt_f opt
Where epe.per_in_ler_id = p_per_in_ler_id
AND epe.plip_id = p_plip_id
AND epe.comp_lvl_cd = 'OIPL'
AND epe.oipl_id = oipl.oipl_id
AND oipl.opt_id = opt.opt_id
AND p_effective_date between oipl.effective_start_date and oipl.effective_end_date
AND p_effective_date between opt.effective_start_date and opt.effective_end_date;
Select opt.opt_id,
oipl.oipl_id,
opt.name,
epe.elctbl_flag,
epe.elig_per_elctbl_chc_id
From ben_elig_per_elctbl_chc epe,
ben_oipl_f oipl,
ben_opt_f opt
Where epe.per_in_ler_id = p_per_in_ler_id
AND epe.plip_id is NULL and epe.pl_id=p_pl_id
AND epe.comp_lvl_cd = 'OIPL'
AND epe.oipl_id = oipl.oipl_id
AND oipl.opt_id = opt.opt_id
AND p_effective_date between oipl.effective_start_date and oipl.effective_end_date
AND p_effective_date between opt.effective_start_date and opt.effective_end_date;
Select abr.name,
abr.acty_base_rt_id,
ecr.enrt_rt_id,
decode(ecr.entr_val_at_enrt_flag, 'Y', ecr.dflt_val, ecr.val) val,
ecr.cmcd_val,
ecr.cmcd_acty_ref_perd_cd,
ecr.nnmntry_uom
From ben_enrt_rt ecr,
ben_acty_base_rt_f abr
Where ecr.elig_per_elctbl_chc_id = p_elig_per_elctbl_chc_id
AND ecr.dsply_on_enrt_flag = 'Y'
AND ecr.enrt_bnft_id IS NULL
AND abr.acty_base_rt_id = ecr.acty_base_rt_id
AND p_effective_date BETWEEN abr.effective_start_date AND abr.effective_end_date
UNION ALL
Select abr.name,
abr.acty_base_rt_id,
ecr.enrt_rt_id,
decode(ecr.entr_val_at_enrt_flag, 'Y', ecr.dflt_val, ecr.val) val,
ecr.cmcd_val,
ecr.cmcd_acty_ref_perd_cd,
ecr.nnmntry_uom
From ben_enrt_rt ecr,
ben_enrt_bnft enb,
ben_acty_base_rt_f abr
Where enb.elig_per_elctbl_chc_id = p_elig_per_elctbl_chc_id
AND ecr.dsply_on_enrt_flag = 'Y'
AND enb.enrt_bnft_id = ecr.enrt_bnft_id
AND abr.acty_base_rt_id = ecr.acty_base_rt_id
AND p_effective_date between abr.effective_start_date and abr.effective_end_date;
Select hierarchy_id from
pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and parent_hierarchy_id=p_plip_id
and hierarchy_type='OIPLIP';
Select information3
From pqh_role_extra_info ,
ben_oiplip_f
Where oipl_id=p_oipl_id
and plip_id=p_plip_id
and g_effective_date between effective_start_date and effective_end_date
and role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1='OIPLIP'
and information2=to_char(oiplip_id);
Delete from pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_id=C1.hierarchy_id and hierarchy_type='OIPLIP';
Select hierarchy_id from
pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and parent_hierarchy_id=p_ptip_id
and hierarchy_type='PLIP';
Select information3
From pqh_role_extra_info
Where role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1='PLIP'
and information2=to_char(p_plip_id);
Delete from pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_id=C1.hierarchy_id and hierarchy_type='PLIP';
Select hierarchy_id from
pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and parent_hierarchy_id=p_pgm_id
and hierarchy_type='PTIP';
Select information3
From pqh_role_extra_info
Where role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1='PTIP'
and information2=to_char(p_ptip_id);
Delete from pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_id=C1.hierarchy_id and hierarchy_type='PTIP';
Select hierarchy_id from
pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_type='PGM';
Select information3
From pqh_role_extra_info
Where role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1='PGM'
and information2=p_pgm_id;
Delete from pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_id=C1.hierarchy_id and hierarchy_type='PGM';
Select hierarchy_id from
pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and parent_hierarchy_id=p_pnip_id
and hierarchy_type='OIPNIP';
Select information3
From pqh_role_extra_info
Where role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1='OIPNIP'
and information2=to_char(p_oipnip_id);
Delete from pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_id=C1.hierarchy_id and hierarchy_type='OIPNIP';
Select hierarchy_id from
pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and parent_hierarchy_id=p_pl_typ_id
and hierarchy_type='PNIP';
Select information3
From pqh_role_extra_info
Where role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1='PNIP'
and information2=to_char(p_pnip_id);
Delete from pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_id=C1.hierarchy_id and hierarchy_type='PNIP';
Select hierarchy_id from
pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_type='PT';
Select information3
From pqh_role_extra_info
Where role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1='PT'
and information2=p_pl_typ_id;
Delete from pqh_pa_whatif_results
where whatif_results_batch_id=p_whatif_results_batch_id
and hierarchy_id=C1.hierarchy_id and hierarchy_type='PT';
Select 1
From pqh_role_extra_info
Where role_id=g_role_id
and information_type='BEN_SS_ROLE_COMP_OBJECTS'
and information1 <> 'LE';
SELECT pqh_pa_whatif_results_s.nextval
FROM sys.dual;
INSERT INTO PQH_PA_WHATIF_RESULTS (
WHATIF_RESULTS_BATCH_ID
,PERSON_ID
,BUSINESS_GROUP_ID
,TRANSACTION_ID
,LER_ID
,HIERARCHY_ID
,HIERARCHY_TYPE
,PARENT_HIERARCHY_ID
,PARENT_HIERARCHY_TYPE
,NAME
,UOM
,NNMNTRY_UOM
,ACTY_REF_PERD_CD
,CRRNT_ELCTBL_FLAG
,CRRNT_CVG_VAL
,CRRNT_VAL
,CRRNT_CMCD_VAL
,CRRNT_CMCD_ACTY_REF_PERD_CD
,WATIF_ELCTBL_FLAG
,WATIF_CVG_VAL
,WATIF_VAL
,WATIF_CMCD_VAL
,WATIF_CMCD_ACTY_REF_PERD_CD
,OBJECT_VERSION_NUMBER)
VALUES (
p_whatif_results_batch_id
,p_person_id
,p_business_group_id
,p_transaction_id
,p_ler_id
,g_hierarchy(i).HIERARCHY_ID
,g_hierarchy(i).HIERARCHY_TYPE
,g_hierarchy(i).PARENT_HIERARCHY_ID
,g_hierarchy(i).PARENT_HIERARCHY_TYPE
,g_hierarchy(i).NAME
,g_hierarchy(i).UOM
,g_hierarchy(i).NNMNTRY_UOM
,g_hierarchy(i).ACTY_REF_PERD_CD
,g_hierarchy(i).CRRNT_ELCTBL_FLAG
,g_hierarchy(i).CRRNT_CVG_VAL
,g_hierarchy(i).CRRNT_VAL
,g_hierarchy(i).CRRNT_CMCD_VAL
,g_hierarchy(i).CRRNT_CMCD_ACTY_REF_PERD_CD
,g_hierarchy(i).WATIF_ELCTBL_FLAG
,g_hierarchy(i).WATIF_CVG_VAL
,g_hierarchy(i).WATIF_VAL
,g_hierarchy(i).WATIF_CMCD_VAL
,g_hierarchy(i).WATIF_CMCD_ACTY_REF_PERD_CD
,1 );
SELECT DISTINCT whatif_results_batch_id
FROM pqh_pa_whatif_results
WHERE CREATION_DATE < trunc(SYSDATE);
DELETE PQH_PA_WHATIF_RESULTS
WHERE WHATIF_RESULTS_BATCH_ID = csr_purge_data_rec.whatif_results_batch_id;
Select rls.role_id
From pqh_roles rls
,per_people_extra_info pei
,fnd_user usr
Where rls.role_type_cd=p_user_type
and nvl(rls.enable_flag,'N')='Y'
and rls.role_id =to_number(pei_information3)
and pei.information_type='PQH_ROLE_USERS'
and nvl(pei_information5,'N')='Y'
and nvl(pei_information9,'N')='Y'
and pei.person_id=usr.employee_id
and usr.user_id=p_user_id;
Select role_id
From pqh_roles
Where role_type_cd=p_user_type
and role_name='XXXX';
select ptn.ptnl_ler_for_per_id,
ptn.ptnl_ler_for_per_stat_cd,
ptn.lf_evt_ocrd_dt lf_evt_ocrd_dt
from ben_ptnl_ler_for_per ptn,
ben_ler_f ler
where ptn.person_id = p_person_id
and ptn.business_group_id = p_business_group_id
and ptn.lf_evt_ocrd_dt > l_lf_evt_ocrd_dt
and ptn.ler_id = ler.ler_id
and ptn.lf_evt_ocrd_dt between
ler.effective_start_date and ler.effective_end_date
and ler.typ_cd not in ('SCHEDDU','COMP','GSP','ABS')
and ptn.ptnl_ler_for_per_stat_cd in ('UNPROCD', 'DTCTD', 'MNL', 'MNLO')
order by lf_evt_ocrd_dt desc;
g_hierarchy.DELETE;
g_hierarchy.DELETE;
SELECT pqh_pa_whatif_results_s.nextval INTO p_whatif_results_batch_id from dual;
INSERT INTO PQH_PA_WHATIF_RESULTS (
WHATIF_RESULTS_BATCH_ID
,PERSON_ID
,BUSINESS_GROUP_ID
,LER_ID
,NAME
)
VALUES (
p_whatif_results_batch_id
,p_person_id
,p_business_group_id
,g_hierarchy(i).ler_id
,g_hierarchy(i).NAME
);
g_hierarchy.DELETE;
g_hierarchy.DELETE;
SELECT transaction_step_id
FROM hr_api_transaction_steps
WHERE transaction_id=txn_id;
,p_selected_person_id =>p_person_id
,p_transaction_effective_date =>sysdate
,p_process_name =>'SSBENWHATIF'
,p_status =>'ACTIVE'
,p_transaction_id =>p_txn_id);
DELETE FROM hr_api_transaction_values
WHERE transaction_step_id=rec_typ.transaction_step_id;
DELETE FROM hr_api_transaction_steps
WHERE transaction_id=p_txn_id;
Select whatif_lbl_txt label
From ben_per_info_chg_cs_ler_f a,
ben_ler_per_info_cs_ler_f b
Where a.PER_INFO_CHG_CS_LER_ID=b.PER_INFO_CHG_CS_LER_ID
and b.ler_id=p_ler_id
and a.WHATIF_LBL_TXT is not null
and p_effective_date between a.effective_start_date and a.effective_end_date
and p_effective_date between b.effective_start_date and b.effective_end_date;