DBA Data[Home] [Help]

APPS.BEN_MANAGE_LIFE_EVENTS dependencies on BEN_CWB_HRCHY

Line 2985: from ben_cwb_hrchy pel_0,

2981: cursor c_no_0_hrchy(p_pl_id number,
2982: p_lf_evt_ocrd_dt date,
2983: p_business_group_id number) is
2984: select unique pel_0.mgr_pil_elctbl_chc_popl_id
2985: from ben_cwb_hrchy pel_0,
2986: ben_pil_elctbl_chc_popl mgr_pel_0,
2987: ben_per_in_ler pil_0
2988: where
2989: mgr_pel_0.pil_elctbl_chc_popl_id = pel_0.mgr_pil_elctbl_chc_popl_id

Line 2999: from ben_cwb_hrchy hrh,

2995: and pil_0.per_in_ler_stat_cd = 'STRTD'
2996: and pel_0.lvl_num > 0
2997: and pel_0.mgr_pil_elctbl_chc_popl_id not in
2998: ( select mgr_pel.pil_elctbl_chc_popl_id
2999: from ben_cwb_hrchy hrh,
3000: ben_pil_elctbl_chc_popl mgr_pel,
3001: ben_per_in_ler pil
3002: where hrh.mgr_pil_elctbl_chc_popl_id =
3003: hrh.emp_pil_elctbl_chc_popl_id

Line 3023: ben_cwb_hrchy cwb,

3019: select
3020: cwb.emp_pil_elctbl_chc_popl_id,
3021: pel.ws_mgr_id
3022: from
3023: ben_cwb_hrchy cwb,
3024: ben_pil_elctbl_chc_popl pel ,
3025: ben_per_in_ler pil
3026: where
3027: cwb.mgr_pil_elctbl_chc_popl_id = -1

Line 3120: insert into ben_cwb_hrchy (

3116: ||p_emp_pil_elctbl_chc_popl_id,10);
3117: hr_utility.set_location('insert_mgr_hrchy p_mgr_pil_elctbl_chc_popl_id '
3118: ||p_mgr_pil_elctbl_chc_popl_id || ' lvl = ' || p_lvl_num, 20);
3119: end if;
3120: insert into ben_cwb_hrchy (
3121: emp_pil_elctbl_chc_popl_id,
3122: mgr_pil_elctbl_chc_popl_id,
3123: lvl_num )
3124: values (

Line 3142: from ben_cwb_hrchy cwh

3138: -- CWB bug : 2712602
3139: --
3140: cursor c_cwh is
3141: select rowid
3142: from ben_cwb_hrchy cwh
3143: where cwh.lvl_num = -1 and
3144: cwh.mgr_pil_elctbl_chc_popl_id = -1
3145: --
3146: -- Bug 2541072 : Do not consider all per in ler's.

Line 3169: from ben_cwb_hrchy cwh

3165: -- And also the last subordinate is now reporting to another manager
3166: -- we need to delete the pel,0,0 row of the employee.
3167: --
3168: delete
3169: from ben_cwb_hrchy cwh
3170: where (( cwh.lvl_num = -1
3171: and cwh.mgr_pil_elctbl_chc_popl_id = -1) OR
3172: ( cwh.lvl_num = 0 and
3173: cwh.mgr_pil_elctbl_chc_popl_id = cwh.emp_pil_elctbl_chc_popl_id ) )

Line 3176: from ben_cwb_hrchy cwh1

3172: ( cwh.lvl_num = 0 and
3173: cwh.mgr_pil_elctbl_chc_popl_id = cwh.emp_pil_elctbl_chc_popl_id ) )
3174: and not exists
3175: (select null
3176: from ben_cwb_hrchy cwh1
3177: where cwh1.mgr_pil_elctbl_chc_popl_id = cwh.emp_pil_elctbl_chc_popl_id
3178: and cwh1.lvl_num <> 0
3179: )
3180: --

Line 3202: update ben_cwb_hrchy cwh

3198: for l_cwh in c_cwh loop
3199: --
3200: begin
3201: --
3202: update ben_cwb_hrchy cwh
3203: set cwh.mgr_pil_elctbl_chc_popl_id = cwh.emp_pil_elctbl_chc_popl_id,
3204: cwh.lvl_num = 0
3205: where cwh.lvl_num = -1
3206: and cwh.mgr_pil_elctbl_chc_popl_id = -1

Line 3210: delete from ben_cwb_hrchy where rowid = l_cwh.rowid;null;

3206: and cwh.mgr_pil_elctbl_chc_popl_id = -1
3207: and cwh.rowid = l_cwh.rowid;
3208: exception
3209: when others then
3210: delete from ben_cwb_hrchy where rowid = l_cwh.rowid;null;
3211: end;
3212: --
3213: end loop;
3214: --

Line 3354: delete from ben_cwb_hrchy

3350: end if;
3351: --
3352: -- CWB 2712602 : Delete all the hrchy data linked to backed out per in ler.
3353: --
3354: delete from ben_cwb_hrchy
3355: where emp_pil_elctbl_chc_popl_id in (
3356: select pel.pil_elctbl_chc_popl_id
3357: from ben_pil_elctbl_chc_popl pel,
3358: ben_per_in_ler pil

Line 3364: delete from ben_cwb_hrchy

3360: and pil.lf_evt_ocrd_dt = lv_lf_evt_ocrd_dt
3361: and pil.per_in_ler_id = pel.per_in_ler_id
3362: and pil.per_in_ler_stat_cd = 'BCKDT');
3363: --
3364: delete from ben_cwb_hrchy
3365: where mgr_pil_elctbl_chc_popl_id in (
3366: select pel.pil_elctbl_chc_popl_id
3367: from ben_pil_elctbl_chc_popl pel,
3368: ben_per_in_ler pil

Line 3384: insert into ben_cwb_hrchy (

3380: for l_no_0_hrchy in c_no_0_hrchy(lv_pl_id, lv_lf_evt_ocrd_dt, lv_business_group_id) loop
3381: --
3382: begin
3383: --
3384: insert into ben_cwb_hrchy (
3385: emp_pil_elctbl_chc_popl_id,
3386: mgr_pil_elctbl_chc_popl_id,
3387: lvl_num )
3388: values (

Line 3934: ben_cwb_hrchy hrc

3930: cursor c_hrchy(cv_emp_epe_id in number) is
3931: select hrc.emp_pil_elctbl_chc_popl_id,
3932: epe.pil_elctbl_chc_popl_id
3933: from ben_elig_per_elctbl_chc epe,
3934: ben_cwb_hrchy hrc
3935: where epe.elig_per_elctbl_chc_id = cv_emp_epe_id
3936: and hrc.emp_pil_elctbl_chc_popl_id(+) = epe.pil_elctbl_chc_popl_id;
3937: --
3938: begin

Line 4119: insert into ben_cwb_hrchy (

4115: --
4116: if l_pel_id is not null and l_emp_pel_id is null then
4117: --
4118: begin
4119: insert into ben_cwb_hrchy (
4120: emp_pil_elctbl_chc_popl_id,
4121: mgr_pil_elctbl_chc_popl_id,
4122: lvl_num )
4123: values(

Line 7036: insert into ben_cwb_hrchy (

7032: --
7033: -- Step 1
7034: begin
7035: --
7036: insert into ben_cwb_hrchy (
7037: emp_pil_elctbl_chc_popl_id,
7038: mgr_pil_elctbl_chc_popl_id,
7039: lvl_num )
7040: values (

Line 7069: from ben_cwb_hrchy

7065: declare
7066: cursor c_emp_repo is
7067: select
7068: emp_pil_elctbl_chc_popl_id
7069: from ben_cwb_hrchy
7070: where mgr_pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
7071: and lvl_num > 0;
7072: begin
7073: --

Line 7078: insert into ben_cwb_hrchy (

7074: for r_emp_repo in c_emp_repo loop
7075: --
7076: begin
7077: -- Bug 2574791
7078: insert into ben_cwb_hrchy (
7079: emp_pil_elctbl_chc_popl_id,
7080: mgr_pil_elctbl_chc_popl_id,
7081: lvl_num ) values (r_emp_repo.emp_pil_elctbl_chc_popl_id, -1, -1);
7082: exception when others then

Line 7107: delete from ben_cwb_hrchy

7103: begin
7104: --
7105: --First Delete the Managers in the Hierarchy
7106: --
7107: delete from ben_cwb_hrchy
7108: where emp_pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
7109: and lvl_num >= 0;
7110: --
7111: -- Now delete the Employees reporting to this manager(if he is a manager).

Line 7113: delete from ben_cwb_hrchy

7109: and lvl_num >= 0;
7110: --
7111: -- Now delete the Employees reporting to this manager(if he is a manager).
7112: --
7113: delete from ben_cwb_hrchy
7114: where emp_pil_elctbl_chc_popl_id in (
7115: select emp_pil_elctbl_chc_popl_id
7116: from ben_cwb_hrchy
7117: where mgr_pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id )

Line 7116: from ben_cwb_hrchy

7112: --
7113: delete from ben_cwb_hrchy
7114: where emp_pil_elctbl_chc_popl_id in (
7115: select emp_pil_elctbl_chc_popl_id
7116: from ben_cwb_hrchy
7117: where mgr_pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id )
7118: and lvl_num >= 0;
7119: --
7120: exception when others then

Line 7147: insert into ben_cwb_hrchy(

7143: end if;
7144: --
7145: begin
7146: --
7147: insert into ben_cwb_hrchy(
7148: emp_pil_elctbl_chc_popl_id,
7149: mgr_pil_elctbl_chc_popl_id,
7150: lvl_num )
7151: select

Line 7155: from ben_cwb_hrchy cwb1

7151: select
7152: distinct emp_pil_elctbl_chc_popl_id,
7153: emp_pil_elctbl_chc_popl_id,
7154: 0
7155: from ben_cwb_hrchy cwb1
7156: where emp_pil_elctbl_chc_popl_id =
7157: ( select mgr_pil_elctbl_chc_popl_id from ben_cwb_hrchy
7158: where emp_pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
7159: and lvl_num = 1 )

Line 7157: ( select mgr_pil_elctbl_chc_popl_id from ben_cwb_hrchy

7153: emp_pil_elctbl_chc_popl_id,
7154: 0
7155: from ben_cwb_hrchy cwb1
7156: where emp_pil_elctbl_chc_popl_id =
7157: ( select mgr_pil_elctbl_chc_popl_id from ben_cwb_hrchy
7158: where emp_pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
7159: and lvl_num = 1 )
7160: and not exists ( select null from ben_cwb_hrchy cwb2
7161: where cwb1.emp_pil_elctbl_chc_popl_id = cwb2.emp_pil_elctbl_chc_popl_id

Line 7160: and not exists ( select null from ben_cwb_hrchy cwb2

7156: where emp_pil_elctbl_chc_popl_id =
7157: ( select mgr_pil_elctbl_chc_popl_id from ben_cwb_hrchy
7158: where emp_pil_elctbl_chc_popl_id = p_pil_elctbl_chc_popl_id
7159: and lvl_num = 1 )
7160: and not exists ( select null from ben_cwb_hrchy cwb2
7161: where cwb1.emp_pil_elctbl_chc_popl_id = cwb2.emp_pil_elctbl_chc_popl_id
7162: and lvl_num = 0 ) ;
7163: --
7164: exception when no_data_found then