DBA Data[Home] [Help]

APPS.BEN_MANAGE_CWB_LIFE_EVENTS dependencies on BEN_CWB_GROUP_HRCHY

Line 833: from ben_cwb_group_hrchy hrh_0,

829: --
830: cursor c_no_0_hrchy(p_pl_id number,
831: p_lf_evt_ocrd_dt date) is
832: select unique hrh_0.mgr_per_in_ler_id
833: from ben_cwb_group_hrchy hrh_0,
834: ben_cwb_person_info mgr_info_0
835: where mgr_info_0.group_per_in_ler_id = hrh_0.emp_per_in_ler_id
836: and mgr_info_0.group_pl_id = p_pl_id
837: and mgr_info_0.lf_evt_ocrd_dt = p_lf_evt_ocrd_dt

Line 841: from ben_cwb_group_hrchy hrh

837: and mgr_info_0.lf_evt_ocrd_dt = p_lf_evt_ocrd_dt
838: and hrh_0.lvl_num = 1
839: and not exists
840: ( select 'Y'
841: from ben_cwb_group_hrchy hrh
842: where hrh.mgr_per_in_ler_id = hrh_0.mgr_per_in_ler_id
843: and hrh.emp_per_in_ler_id = hrh_0.mgr_per_in_ler_id
844: and hrh.lvl_num = 0
845: );

Line 857: ben_cwb_group_hrchy cwb,

853: cwb.emp_per_in_ler_id,
854: pil.ws_mgr_id,
855: pil.person_id
856: from
857: ben_cwb_group_hrchy cwb,
858: ben_per_in_ler pil
859: where
860: cwb.mgr_per_in_ler_id = -1
861: and pil.per_in_ler_id = cwb.emp_per_in_ler_id

Line 937: insert into ben_cwb_group_hrchy (

933: hr_utility.set_location('insert_mgr_hrchy p_mgr_per_in_ler_id '
934: ||p_mgr_per_in_ler_id || ' lvl = '
935: || p_lvl_num, 20);
936: end if;
937: insert into ben_cwb_group_hrchy (
938: emp_per_in_ler_id,
939: mgr_per_in_ler_id,
940: lvl_num )
941: values (

Line 958: from ben_cwb_group_hrchy cwh

954: -- CWB bug : 2712602
955: --
956: cursor c_cwh is
957: select rowid
958: from ben_cwb_group_hrchy cwh
959: where cwh.lvl_num = -1 and
960: cwh.mgr_per_in_ler_id = -1
961: --
962: -- Bug 2541072 : Do not consider all per in ler's.

Line 981: from ben_cwb_group_hrchy cwh

977: -- And also the last subordinate is now reporting to another manager
978: -- we need to delete the pil,0,0 row of the employee.
979: --
980: delete
981: from ben_cwb_group_hrchy cwh
982: where (( cwh.lvl_num = -1
983: and cwh.mgr_per_in_ler_id = -1) OR
984: ( cwh.lvl_num = 0 and
985: cwh.mgr_per_in_ler_id = cwh.emp_per_in_ler_id ) )

Line 988: from ben_cwb_group_hrchy cwh1

984: ( cwh.lvl_num = 0 and
985: cwh.mgr_per_in_ler_id = cwh.emp_per_in_ler_id ) )
986: and not exists
987: (select null
988: from ben_cwb_group_hrchy cwh1
989: where cwh1.mgr_per_in_ler_id = cwh.emp_per_in_ler_id
990: and cwh1.lvl_num <> 0
991: )
992: --

Line 1010: from ben_per_in_ler pil, ben_cwb_group_hrchy cwh

1006: -- delete, but waiting for GSI to validate it scales better.
1007: -- For bug 4587770
1008: --
1009: select cwh.rowid
1010: from ben_per_in_ler pil, ben_cwb_group_hrchy cwh
1011: where pil.per_in_ler_id = cwh.emp_per_in_ler_id
1012: and pil.per_in_ler_stat_cd = 'STRTD'
1013: and pil.lf_evt_ocrd_dt = cv_lf_evt_ocrd_dt
1014: and pil.group_pl_id = cv_pl_id

Line 1021: from ben_cwb_group_hrchy cwh1

1017: ( cwh.lvl_num = 0 and
1018: cwh.mgr_per_in_ler_id = cwh.emp_per_in_ler_id ) )
1019: and not exists
1020: (select null
1021: from ben_cwb_group_hrchy cwh1
1022: where cwh1.mgr_per_in_ler_id = cwh.emp_per_in_ler_id
1023: and cwh1.lvl_num <> 0
1024: );
1025: */

Line 1033: update ben_cwb_group_hrchy cwh

1029: for l_cwh in c_cwh loop
1030: --
1031: begin
1032: --
1033: update ben_cwb_group_hrchy cwh
1034: set cwh.mgr_per_in_ler_id = cwh.emp_per_in_ler_id,
1035: cwh.lvl_num = 0
1036: where cwh.lvl_num = -1
1037: and cwh.mgr_per_in_ler_id = -1

Line 1041: delete from ben_cwb_group_hrchy where rowid = l_cwh.rowid;null;

1037: and cwh.mgr_per_in_ler_id = -1
1038: and cwh.rowid = l_cwh.rowid;
1039: exception
1040: when others then
1041: delete from ben_cwb_group_hrchy where rowid = l_cwh.rowid;null;
1042: end;
1043: --
1044: end loop;
1045: --

Line 1215: delete from ben_cwb_group_hrchy

1211: if fnd_global.conc_request_id not in ( 0,-1) then
1212: --
1213: -- CWB 2712602 : Delete all the hrchy data linked to backed out per in ler.
1214: --
1215: delete from ben_cwb_group_hrchy
1216: where emp_per_in_ler_id in (
1217: select pil.per_in_ler_id
1218: from ben_per_in_ler pil
1219: where pil.group_pl_id = lv_pl_id

Line 1223: delete from ben_cwb_group_hrchy

1219: where pil.group_pl_id = lv_pl_id
1220: and pil.lf_evt_ocrd_dt = lv_lf_evt_ocrd_dt
1221: and pil.per_in_ler_stat_cd = 'BCKDT');
1222: --
1223: delete from ben_cwb_group_hrchy
1224: where mgr_per_in_ler_id in (
1225: select pil.per_in_ler_id
1226: from ben_per_in_ler pil
1227: where pil.group_pl_id = lv_pl_id

Line 1242: insert into ben_cwb_group_hrchy (

1238: c_no_0_hrchy(lv_pl_id, lv_lf_evt_ocrd_dt) loop
1239: --
1240: begin
1241: --
1242: insert into ben_cwb_group_hrchy (
1243: emp_per_in_ler_id,
1244: mgr_per_in_ler_id,
1245: lvl_num )
1246: values (

Line 1447: from ben_cwb_group_hrchy

1443: l_effective_date date := p_effective_date;
1444: --
1445: cursor c_cwb_hrchy(cv_emp_pil_id in number) is
1446: select emp_per_in_ler_id
1447: from ben_cwb_group_hrchy
1448: where emp_per_in_ler_id = cv_emp_pil_id;
1449: --
1450: cursor c_cwb_tasks(cv_pl_id in number) is
1451: select *

Line 1466: -- Populate ben_cwb_group_hrchy

1462: end if;
1463: --
1464: g_cache_group_plan_rec.group_per_in_ler_id := p_group_per_in_ler_id;
1465: --
1466: -- Populate ben_cwb_group_hrchy
1467: --
1468: open c_cwb_hrchy(p_group_per_in_ler_id);
1469: fetch c_cwb_hrchy into l_emp_pil_id;
1470: --

Line 1474: insert into ben_cwb_group_hrchy (

1470: --
1471: hr_utility.set_location('p_group_per_in_ler_id: '||p_group_per_in_ler_id,111);
1472: if c_cwb_hrchy%notfound then
1473: --
1474: insert into ben_cwb_group_hrchy (
1475: emp_per_in_ler_id,
1476: mgr_per_in_ler_id,
1477: lvl_num,
1478: OBJECT_VERSION_NUMBER )

Line 1810: from ben_cwb_group_hrchy hrh

1806: and ptnl.ptnl_ler_for_per_id = pil.ptnl_ler_for_per_id
1807: and ptnl.ptnl_ler_for_per_stat_cd = 'PROCD'
1808: and not exists
1809: (select 'Y'
1810: from ben_cwb_group_hrchy hrh
1811: where hrh.mgr_per_in_ler_id = pil.per_in_ler_id
1812: and hrh.lvl_num > 0)
1813: and not exists
1814: (select 'Y'

Line 3717: insert into ben_cwb_group_hrchy (

3713: --
3714: -- Step 1
3715: begin
3716: --
3717: insert into ben_cwb_group_hrchy (
3718: emp_per_in_ler_id,
3719: mgr_per_in_ler_id,
3720: lvl_num )
3721: values (

Line 3750: from ben_cwb_group_hrchy

3746: declare
3747:
3748: cursor c_emp_repo is
3749: select emp_per_in_ler_id
3750: from ben_cwb_group_hrchy
3751: where mgr_per_in_ler_id = p_group_per_in_ler_id
3752: and lvl_num > 0 ;
3753: --
3754: begin

Line 3760: insert into ben_cwb_group_hrchy (

3756: for r_emp_repo in c_emp_repo loop
3757: --
3758: begin
3759:
3760: insert into ben_cwb_group_hrchy (
3761: emp_per_in_ler_id,
3762: mgr_per_in_ler_id,
3763: lvl_num ) values (r_emp_repo.emp_per_in_ler_id, -1, -1);
3764: --

Line 3790: delete from ben_cwb_group_hrchy

3786: begin
3787: --
3788: --First Delete the Manager's own Hierarchy
3789: --
3790: delete from ben_cwb_group_hrchy
3791: where emp_per_in_ler_id = p_group_per_in_ler_id
3792: and lvl_num >= 0;
3793: --
3794: -- Now delete the Employees reporting to this manager(if he is a manager).

Line 3796: delete from ben_cwb_group_hrchy

3792: and lvl_num >= 0;
3793: --
3794: -- Now delete the Employees reporting to this manager(if he is a manager).
3795: --
3796: delete from ben_cwb_group_hrchy
3797: where emp_per_in_ler_id in (
3798: select emp_per_in_ler_id
3799: from ben_cwb_group_hrchy
3800: where mgr_per_in_ler_id = p_group_per_in_ler_id )

Line 3799: from ben_cwb_group_hrchy

3795: --
3796: delete from ben_cwb_group_hrchy
3797: where emp_per_in_ler_id in (
3798: select emp_per_in_ler_id
3799: from ben_cwb_group_hrchy
3800: where mgr_per_in_ler_id = p_group_per_in_ler_id )
3801: and lvl_num >= 0;
3802: --
3803: exception when others then

Line 3835: insert into ben_cwb_group_hrchy(

3831: end if;
3832: --
3833: begin
3834: --
3835: insert into ben_cwb_group_hrchy(
3836: emp_per_in_ler_id,
3837: mgr_per_in_ler_id,
3838: lvl_num )
3839: select

Line 3843: from ben_cwb_group_hrchy cwb1

3839: select
3840: distinct emp_per_in_ler_id,
3841: emp_per_in_ler_id,
3842: 0
3843: from ben_cwb_group_hrchy cwb1
3844: where emp_per_in_ler_id =
3845: ( select mgr_per_in_ler_id from ben_cwb_group_hrchy
3846: where emp_per_in_ler_id = p_group_per_in_ler_id
3847: and lvl_num = 1 )

Line 3845: ( select mgr_per_in_ler_id from ben_cwb_group_hrchy

3841: emp_per_in_ler_id,
3842: 0
3843: from ben_cwb_group_hrchy cwb1
3844: where emp_per_in_ler_id =
3845: ( select mgr_per_in_ler_id from ben_cwb_group_hrchy
3846: where emp_per_in_ler_id = p_group_per_in_ler_id
3847: and lvl_num = 1 )
3848: and not exists ( select null from ben_cwb_group_hrchy cwb2
3849: where cwb1.emp_per_in_ler_id = cwb2.emp_per_in_ler_id

Line 3848: and not exists ( select null from ben_cwb_group_hrchy cwb2

3844: where emp_per_in_ler_id =
3845: ( select mgr_per_in_ler_id from ben_cwb_group_hrchy
3846: where emp_per_in_ler_id = p_group_per_in_ler_id
3847: and lvl_num = 1 )
3848: and not exists ( select null from ben_cwb_group_hrchy cwb2
3849: where cwb1.emp_per_in_ler_id = cwb2.emp_per_in_ler_id
3850: and lvl_num = 0 ) ;
3851: --
3852: exception when no_data_found then

Line 3867: insert into ben_cwb_group_hrchy(

3863: -- move the sub query into main query.
3864: -- Waiting for GSI to validate. Once validated at gsi db, following code
3865: -- can replace above insert.
3866: --
3867: insert into ben_cwb_group_hrchy(
3868: emp_per_in_ler_id,
3869: mgr_per_in_ler_id,
3870: lvl_num )
3871: select

Line 3875: from ben_cwb_group_hrchy h

3871: select
3872: h.mgr_per_in_ler_id
3873: ,h.mgr_per_in_ler_id
3874: ,0
3875: from ben_cwb_group_hrchy h
3876: where h.emp_per_in_ler_id = p_group_per_in_ler_id
3877: and h.lvl_num = 1;
3878: --
3879: exception when others then

Line 4499: Insert row into ben_cwb_group_hrchy if row already not exists.

4495: If cached data for one group plan is not available,
4496: cache group plan per in ler data.
4497:
4498: Create potential, per in ler for the group_ler_id for the person.
4499: Insert row into ben_cwb_group_hrchy if row already not exists.
4500:
4501: Update the group_per_in_ler_id on ben_cwb_person_rates
4502: where group_per_in_ler_id is null and
4503: group_pl_id = p_group_pl_id and lf_evt_ocrd_dt = p_lf_evt_ocrd_dt and

Line 4834: ben_cwb_group_hrchy cgh

4830: and cpg.lf_evt_ocrd_dt = c_lf_evt_ocrd_dt
4831: and exists
4832: (select null
4833: from ben_cwb_person_rates cpr,
4834: ben_cwb_group_hrchy cgh
4835: where cgh.emp_per_in_ler_id = cpr.GROUP_PER_IN_LER_ID
4836: and cpr.ELIG_FLAG = 'Y'
4837: and cgh.LVL_NUM > 1
4838: and cgh.mgr_per_in_ler_id = cpg.GROUP_PER_IN_LER_ID)

Line 4851: ben_cwb_group_hrchy cgh1

4847: and cpg.lf_evt_ocrd_dt = c_lf_evt_ocrd_dt
4848: and not exists
4849: (select null
4850: from ben_cwb_person_rates cpr1,
4851: ben_cwb_group_hrchy cgh1
4852: where cgh1.emp_per_in_ler_id = cpr1.GROUP_PER_IN_LER_ID
4853: and cpr1.ELIG_FLAG = 'Y'
4854: and cgh1.LVL_NUM > 1
4855: and cgh1.mgr_per_in_ler_id = cpg.GROUP_PER_IN_LER_ID)

Line 4859: ben_cwb_group_hrchy cgh

4855: and cgh1.mgr_per_in_ler_id = cpg.GROUP_PER_IN_LER_ID)
4856: and exists
4857: (select null
4858: from ben_cwb_person_rates cpr,
4859: ben_cwb_group_hrchy cgh
4860: where cgh.emp_per_in_ler_id = cpr.GROUP_PER_IN_LER_ID
4861: and cpr.ELIG_FLAG = 'Y'
4862: and cgh.LVL_NUM = 1
4863: and cgh.mgr_per_in_ler_id = cpg.GROUP_PER_IN_LER_ID)