[Home] [Help]
645: --(pen.pl_id=p_pl_id and pen.pgm_id is null))
646: and l_effective_date between
647: pen.effective_start_date and pen.effective_end_date
648: and l_effective_date between
649: pen.enrt_cvg_strt_dt and nvl(pen.enrt_cvg_thru_dt,hr_api.g_eot)
650: and ecd.prtt_enrt_rslt_id=pen.prtt_enrt_rslt_id
651: and (nvl(ecd.ovrdn_flag,'N')='N' or
652: nvl(ecd.ovrdn_thru_dt,l_effective_date)>=l_effective_date)
653: and ecd.business_group_id = pen.business_group_id
667: /* and ( (p_location_id is null and p_organization_id is null
668: and p_legal_entity_id is null and p_payroll_id is null
669: ) or exists (select null
670: from per_assignments_f asg
671: where nvl(asg.location_id,hr_api.g_number) =
672: nvl(p_location_id,hr_api.g_number)
673: and nvl(asg.organization_id,hr_api.g_number) =
674: nvl(p_organization_id,hr_api.g_number)
675: and nvl(asg.soft_coding_keyflex_id,
668: and p_legal_entity_id is null and p_payroll_id is null
669: ) or exists (select null
670: from per_assignments_f asg
671: where nvl(asg.location_id,hr_api.g_number) =
672: nvl(p_location_id,hr_api.g_number)
673: and nvl(asg.organization_id,hr_api.g_number) =
674: nvl(p_organization_id,hr_api.g_number)
675: and nvl(asg.soft_coding_keyflex_id,
676: hr_api.g_number) =
669: ) or exists (select null
670: from per_assignments_f asg
671: where nvl(asg.location_id,hr_api.g_number) =
672: nvl(p_location_id,hr_api.g_number)
673: and nvl(asg.organization_id,hr_api.g_number) =
674: nvl(p_organization_id,hr_api.g_number)
675: and nvl(asg.soft_coding_keyflex_id,
676: hr_api.g_number) =
677: nvl(p_legal_entity_id,hr_api.g_number)
670: from per_assignments_f asg
671: where nvl(asg.location_id,hr_api.g_number) =
672: nvl(p_location_id,hr_api.g_number)
673: and nvl(asg.organization_id,hr_api.g_number) =
674: nvl(p_organization_id,hr_api.g_number)
675: and nvl(asg.soft_coding_keyflex_id,
676: hr_api.g_number) =
677: nvl(p_legal_entity_id,hr_api.g_number)
678: and nvl(asg.payroll_id, hr_api.g_number)=
672: nvl(p_location_id,hr_api.g_number)
673: and nvl(asg.organization_id,hr_api.g_number) =
674: nvl(p_organization_id,hr_api.g_number)
675: and nvl(asg.soft_coding_keyflex_id,
676: hr_api.g_number) =
677: nvl(p_legal_entity_id,hr_api.g_number)
678: and nvl(asg.payroll_id, hr_api.g_number)=
679: nvl(p_payroll_id,hr_api.g_number)
680: and asg.person_id = pen.person_id
673: and nvl(asg.organization_id,hr_api.g_number) =
674: nvl(p_organization_id,hr_api.g_number)
675: and nvl(asg.soft_coding_keyflex_id,
676: hr_api.g_number) =
677: nvl(p_legal_entity_id,hr_api.g_number)
678: and nvl(asg.payroll_id, hr_api.g_number)=
679: nvl(p_payroll_id,hr_api.g_number)
680: and asg.person_id = pen.person_id
681: and asg.assignment_type <> 'C'
674: nvl(p_organization_id,hr_api.g_number)
675: and nvl(asg.soft_coding_keyflex_id,
676: hr_api.g_number) =
677: nvl(p_legal_entity_id,hr_api.g_number)
678: and nvl(asg.payroll_id, hr_api.g_number)=
679: nvl(p_payroll_id,hr_api.g_number)
680: and asg.person_id = pen.person_id
681: and asg.assignment_type <> 'C'
682: and asg.primary_flag = 'Y'
675: and nvl(asg.soft_coding_keyflex_id,
676: hr_api.g_number) =
677: nvl(p_legal_entity_id,hr_api.g_number)
678: and nvl(asg.payroll_id, hr_api.g_number)=
679: nvl(p_payroll_id,hr_api.g_number)
680: and asg.person_id = pen.person_id
681: and asg.assignment_type <> 'C'
682: and asg.primary_flag = 'Y'
683: and asg.business_group_id =
693: and p_payroll_id is null
694: )
695: or exists (select null
696: from per_assignments_f asg
697: where nvl(asg.location_id,hr_api.g_number) =
698: nvl(p_location_id,nvl(asg.location_id,hr_api.g_number))
699: and nvl(asg.organization_id,hr_api.g_number) =
700: nvl(p_organization_id,nvl(asg.organization_id,hr_api.g_number))
701: and nvl(asg.payroll_id,hr_api.g_number) =
694: )
695: or exists (select null
696: from per_assignments_f asg
697: where nvl(asg.location_id,hr_api.g_number) =
698: nvl(p_location_id,nvl(asg.location_id,hr_api.g_number))
699: and nvl(asg.organization_id,hr_api.g_number) =
700: nvl(p_organization_id,nvl(asg.organization_id,hr_api.g_number))
701: and nvl(asg.payroll_id,hr_api.g_number) =
702: nvl(p_payroll_id,nvl(asg.payroll_id,hr_api.g_number))
695: or exists (select null
696: from per_assignments_f asg
697: where nvl(asg.location_id,hr_api.g_number) =
698: nvl(p_location_id,nvl(asg.location_id,hr_api.g_number))
699: and nvl(asg.organization_id,hr_api.g_number) =
700: nvl(p_organization_id,nvl(asg.organization_id,hr_api.g_number))
701: and nvl(asg.payroll_id,hr_api.g_number) =
702: nvl(p_payroll_id,nvl(asg.payroll_id,hr_api.g_number))
703: and asg.person_id = pen.person_id
696: from per_assignments_f asg
697: where nvl(asg.location_id,hr_api.g_number) =
698: nvl(p_location_id,nvl(asg.location_id,hr_api.g_number))
699: and nvl(asg.organization_id,hr_api.g_number) =
700: nvl(p_organization_id,nvl(asg.organization_id,hr_api.g_number))
701: and nvl(asg.payroll_id,hr_api.g_number) =
702: nvl(p_payroll_id,nvl(asg.payroll_id,hr_api.g_number))
703: and asg.person_id = pen.person_id
704: and asg.assignment_type <> 'C'
697: where nvl(asg.location_id,hr_api.g_number) =
698: nvl(p_location_id,nvl(asg.location_id,hr_api.g_number))
699: and nvl(asg.organization_id,hr_api.g_number) =
700: nvl(p_organization_id,nvl(asg.organization_id,hr_api.g_number))
701: and nvl(asg.payroll_id,hr_api.g_number) =
702: nvl(p_payroll_id,nvl(asg.payroll_id,hr_api.g_number))
703: and asg.person_id = pen.person_id
704: and asg.assignment_type <> 'C'
705: and asg.primary_flag = 'Y'
698: nvl(p_location_id,nvl(asg.location_id,hr_api.g_number))
699: and nvl(asg.organization_id,hr_api.g_number) =
700: nvl(p_organization_id,nvl(asg.organization_id,hr_api.g_number))
701: and nvl(asg.payroll_id,hr_api.g_number) =
702: nvl(p_payroll_id,nvl(asg.payroll_id,hr_api.g_number))
703: and asg.person_id = pen.person_id
704: and asg.assignment_type <> 'C'
705: and asg.primary_flag = 'Y'
706: and asg.business_group_id =
798: -- Check that all the mandatory input parameters
799: -- such as p_business_group_id, p_mode, p_effective_date
800: --
801: l_actn := 'Checking arguments...';
802: hr_api.mandatory_arg_error(p_api_name => g_package
803: ,p_argument => 'p_business_group_id'
804: ,p_argument_value => p_business_group_id
805: );
806: hr_api.mandatory_arg_error(p_api_name => g_package
802: hr_api.mandatory_arg_error(p_api_name => g_package
803: ,p_argument => 'p_business_group_id'
804: ,p_argument_value => p_business_group_id
805: );
806: hr_api.mandatory_arg_error(p_api_name => g_package
807: ,p_argument => 'p_effective_date'
808: ,p_argument_value => p_effective_date
809: );
810: --
1240: and p_effective_date between
1241: pen.effective_start_date and pen.effective_end_date
1242: and p_effective_date between
1243: pen.enrt_cvg_strt_dt and nvl(pen.enrt_cvg_thru_dt,
1244: hr_api.g_eot)
1245: and ecd.prtt_enrt_rslt_id=pen.prtt_enrt_rslt_id
1246: and ecd.business_group_id = pen.business_group_id
1247: and p_effective_date between
1248: ecd.effective_start_date and ecd.effective_end_date
1516: hr_utility.set_location('SARKAR l_rec.ovrdn_thru_dt '||l_rec.ovrdn_thru_dt,8888);
1517:
1518:
1519: if nvl(l_rec.ovrdn_flag,'N') = 'Y' and
1520: nvl(l_rec.ovrdn_thru_dt,hr_api.g_eot) >= p_effective_date then
1521:
1522: null;
1523: else
1524: calc_dpnt_cvg_end_dt(
1548: --
1549: -- Call api
1550: --
1551: if p_effective_date=l_rec.effective_start_date then
1552: l_datetrack_mode:=hr_api.g_correction;
1553: else
1554: l_datetrack_mode:=hr_api.g_update;
1555: end if;
1556: --
1550: --
1551: if p_effective_date=l_rec.effective_start_date then
1552: l_datetrack_mode:=hr_api.g_correction;
1553: else
1554: l_datetrack_mode:=hr_api.g_update;
1555: end if;
1556: --
1557: -- According to the cursor, the coverage has started as of the
1558: -- effective date, so the coverage through date should atleast be
1569: hr_utility.set_location('pdp_id='||to_char(l_rec.elig_cvrd_dpnt_id),111);
1570: hr_utility.set_location('cvg_thru_dt='||to_char(l_returned_end_dt),112);
1571: -- -- Bug 5442301 -- dont update cvg_thru date if it is overriden
1572: if nvl(l_rec.ovrdn_flag,'N') = 'Y' and
1573: nvl(l_rec.ovrdn_thru_dt,hr_api.g_eot) >= p_effective_date then
1574:
1575: null;
1576: else
1577: ben_elig_cvrd_dpnt_api.update_elig_cvrd_dpnt(