50: p_actl_prem_id => p_actl_prem_id,
51: p_object_version_number => p_object_version_number);
52: --
53: if (l_api_updating
54: and nvl(p_actl_prem_id,hr_api.g_number)
55: <> ben_apr_shd.g_old_rec.actl_prem_id) then
56: --
57: -- raise error as PK has changed
58: --
158: p_effective_date => p_effective_date,
159: p_object_version_number => p_object_version_number);
160: --
161: if (l_api_updating
162: and nvl(p_organization_id,hr_api.g_number)
163: <> nvl(ben_apr_shd.g_old_rec.organization_id,hr_api.g_number)
164: or not l_api_updating) and p_organization_id is not null then
165: --
166: -- check if organization_id value exists in hr_all_organization_units
159: p_object_version_number => p_object_version_number);
160: --
161: if (l_api_updating
162: and nvl(p_organization_id,hr_api.g_number)
163: <> nvl(ben_apr_shd.g_old_rec.organization_id,hr_api.g_number)
164: or not l_api_updating) and p_organization_id is not null then
165: --
166: -- check if organization_id value exists in hr_all_organization_units
167: -- table
279: p_effective_date => p_effective_date,
280: p_object_version_number => p_object_version_number);
281: --
282: if (l_api_updating
283: and nvl(p_rndg_rl,hr_api.g_number)
284: <> ben_apr_shd.g_old_rec.rndg_rl
285: or not l_api_updating)
286: and p_rndg_rl is not null then
287: --
374: p_effective_date => p_effective_date,
375: p_object_version_number => p_object_version_number);
376: --
377: if (l_api_updating
378: and nvl(p_val_calc_rl,hr_api.g_number)
379: <> ben_apr_shd.g_old_rec.val_calc_rl
380: or not l_api_updating)
381: and p_val_calc_rl is not null then
382: --
469: p_effective_date => p_effective_date,
470: p_object_version_number => p_object_version_number);
471: --
472: if (l_api_updating
473: and nvl(p_vrbl_rt_add_on_calc_rl,hr_api.g_number)
474: <> ben_apr_shd.g_old_rec.vrbl_rt_add_on_calc_rl
475: or not l_api_updating)
476: and p_vrbl_rt_add_on_calc_rl is not null then
477: --
548: p_object_version_number => p_object_version_number);
549: --
550: if (l_api_updating
551: and p_rndg_cd
552: <> nvl(ben_apr_shd.g_old_rec.rndg_cd,hr_api.g_varchar2)
553: or not l_api_updating)
554: and p_rndg_cd is not null then
555: --
556: -- check if value of lookup falls within lookup type.
554: and p_rndg_cd is not null then
555: --
556: -- check if value of lookup falls within lookup type.
557: --
558: if hr_api.not_exists_in_hr_lookups
559: (p_lookup_type => 'BEN_RNDG',
560: p_lookup_code => p_rndg_cd,
561: p_effective_date => p_effective_date) then
562: --
617: p_object_version_number => p_object_version_number);
618: --
619: if (l_api_updating
620: and p_prdct_cd
621: <> nvl(ben_apr_shd.g_old_rec.prdct_cd,hr_api.g_varchar2)
622: or not l_api_updating)
623: and p_prdct_cd is not null then
624: --
625: -- check if value of lookup falls within lookup type.
623: and p_prdct_cd is not null then
624: --
625: -- check if value of lookup falls within lookup type.
626: --
627: if hr_api.not_exists_in_hr_lookups
628: (p_lookup_type => 'BEN_PRDCT',
629: p_lookup_code => p_prdct_cd,
630: p_effective_date => p_effective_date) then
631: --
686: p_object_version_number => p_object_version_number);
687: --
688: if (l_api_updating
689: and p_mlt_cd
690: <> nvl(ben_apr_shd.g_old_rec.mlt_cd,hr_api.g_varchar2)
691: or not l_api_updating)
692: and p_mlt_cd is not null then
693: --
694: -- check if value of lookup falls within lookup type.
692: and p_mlt_cd is not null then
693: --
694: -- check if value of lookup falls within lookup type.
695: --
696: if hr_api.not_exists_in_hr_lookups
697: (p_lookup_type => 'BEN_ACTL_PREM_MLT',
698: p_lookup_code => p_mlt_cd,
699: p_effective_date => p_effective_date) then
700: --
761: p_object_version_number => p_object_version_number);
762: --
763: if (l_api_updating
764: and p_prtl_mo_det_mthd_cd
765: <> nvl(ben_apr_shd.g_old_rec.prtl_mo_det_mthd_cd,hr_api.g_varchar2)
766: or not l_api_updating)
767: and p_prtl_mo_det_mthd_cd is not null then
768: --
769: -- check if value of lookup falls within lookup type.
767: and p_prtl_mo_det_mthd_cd is not null then
768: --
769: -- check if value of lookup falls within lookup type.
770: --
771: if hr_api.not_exists_in_hr_lookups
772: (p_lookup_type => 'BEN_PRTL_MO_DET_MTHD',
773: p_lookup_code => p_prtl_mo_det_mthd_cd,
774: p_effective_date => p_effective_date) then
775: --
830: p_object_version_number => p_object_version_number);
831: --
832: if (l_api_updating
833: and p_rt_typ_cd
834: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2)
835: or not l_api_updating)
836: and p_rt_typ_cd is not null then
837: --
838: -- check if value of lookup falls within lookup type.
837: --
838: -- check if value of lookup falls within lookup type.
839: --
840: --
841: if hr_api.not_exists_in_hr_lookups
842: (p_lookup_type => 'BEN_RT_TYP',
843: p_lookup_code => p_rt_typ_cd,
844: p_effective_date => p_effective_date) then
845: --
900: p_object_version_number => p_object_version_number);
901: --
902: if (l_api_updating
903: and p_bnft_rt_typ_cd
904: <> nvl(ben_apr_shd.g_old_rec.bnft_rt_typ_cd,hr_api.g_varchar2)
905: or not l_api_updating)
906: and p_bnft_rt_typ_cd is not null then
907: --
908: -- check if value of lookup falls within lookup type.
907: --
908: -- check if value of lookup falls within lookup type.
909: --
910: --
911: if hr_api.not_exists_in_hr_lookups
912: (p_lookup_type => 'BEN_BNFT_RT_TYP',
913: p_lookup_code => p_bnft_rt_typ_cd,
914: p_effective_date => p_effective_date) then
915: --
970: p_object_version_number => p_object_version_number);
971: --
972: if (l_api_updating
973: and p_acty_ref_perd_cd
974: <> nvl(ben_apr_shd.g_old_rec.acty_ref_perd_cd,hr_api.g_varchar2)
975: or not l_api_updating)
976: and p_acty_ref_perd_cd is not null then
977: --
978: -- check if value of lookup falls within lookup type.
977: --
978: -- check if value of lookup falls within lookup type.
979: --
980: --
981: if hr_api.not_exists_in_hr_lookups
982: (p_lookup_type => 'BEN_ACTY_REF_PERD',
983: p_lookup_code => p_acty_ref_perd_cd,
984: p_effective_date => p_effective_date) then
985: --
1041: cursor csr_name is
1042: select null
1043: from ben_actl_prem_f
1044: where name = p_name
1045: and actl_prem_id <> nvl(p_actl_prem_id, hr_api.g_number)
1046: and business_group_id + 0 = p_business_group_id
1047: and p_validation_start_date <= effective_end_date
1048: and p_validation_end_date >= effective_start_date;
1049: --
1561: p_object_version_number => p_object_version_number);
1562: --
1563: if (l_api_updating
1564: and p_prem_asnmt_cd
1565: <> nvl(ben_apr_shd.g_old_rec.prem_asnmt_cd,hr_api.g_varchar2)
1566: or not l_api_updating)
1567: and p_prem_asnmt_cd is not null then
1568: --
1569: -- check if value of lookup falls within lookup type.
1567: and p_prem_asnmt_cd is not null then
1568: --
1569: -- check if value of lookup falls within lookup type.
1570: --
1571: if hr_api.not_exists_in_hr_lookups
1572: (p_lookup_type => 'BEN_PREM_ASNMT',
1573: p_lookup_code => p_prem_asnmt_cd,
1574: p_effective_date => p_effective_date) then
1575: --
1586: end if;
1587: --
1588: if (l_api_updating
1589: and p_prem_asnmt_lvl_cd
1590: <> nvl(ben_apr_shd.g_old_rec.prem_asnmt_lvl_cd,hr_api.g_varchar2)
1591: or not l_api_updating)
1592: and p_prem_asnmt_lvl_cd is not null then
1593: --
1594: -- check if value of lookup falls within lookup type.
1592: and p_prem_asnmt_lvl_cd is not null then
1593: --
1594: -- check if value of lookup falls within lookup type.
1595: --
1596: if hr_api.not_exists_in_hr_lookups
1597: (p_lookup_type => 'BEN_PREM_ASNMT_LVL',
1598: p_lookup_code => p_prem_asnmt_lvl_cd,
1599: p_effective_date => p_effective_date) then
1600: --
1611: end if;
1612: --
1613: if (l_api_updating
1614: and p_actl_prem_typ_cd
1615: <> nvl(ben_apr_shd.g_old_rec.actl_prem_typ_cd,hr_api.g_varchar2)
1616: or not l_api_updating)
1617: and p_actl_prem_typ_cd is not null then
1618: --
1619: -- check if value of lookup falls within lookup type.
1617: and p_actl_prem_typ_cd is not null then
1618: --
1619: -- check if value of lookup falls within lookup type.
1620: --
1621: if hr_api.not_exists_in_hr_lookups
1622: (p_lookup_type => 'BEN_PREM_TYP',
1623: p_lookup_code => p_actl_prem_typ_cd,
1624: p_effective_date => p_effective_date) then
1625: --
1636: end if;
1637: --
1638: if (l_api_updating
1639: and p_prem_pyr_cd
1640: <> nvl(ben_apr_shd.g_old_rec.prem_pyr_cd,hr_api.g_varchar2)
1641: or not l_api_updating)
1642: and p_prem_pyr_cd is not null then
1643: --
1644: -- check if value of lookup falls within lookup type.
1642: and p_prem_pyr_cd is not null then
1643: --
1644: -- check if value of lookup falls within lookup type.
1645: --
1646: if hr_api.not_exists_in_hr_lookups
1647: (p_lookup_type => 'BEN_PREM_PYR',
1648: p_lookup_code => p_prem_pyr_cd,
1649: p_effective_date => p_effective_date) then
1650: --
1661: end if;
1662: --
1663: if (l_api_updating
1664: and p_prsptv_r_rtsptv_cd
1665: <> nvl(ben_apr_shd.g_old_rec.prsptv_r_rtsptv_cd,hr_api.g_varchar2)
1666: or not l_api_updating)
1667: and p_prsptv_r_rtsptv_cd is not null then
1668: --
1669: -- check if value of lookup falls within lookup type.
1667: and p_prsptv_r_rtsptv_cd is not null then
1668: --
1669: -- check if value of lookup falls within lookup type.
1670: --
1671: if hr_api.not_exists_in_hr_lookups
1672: (p_lookup_type => 'BEN_PRSPCTV_R_RTSPCTV',
1673: p_lookup_code => p_prsptv_r_rtsptv_cd,
1674: p_effective_date => p_effective_date) then
1675: --
1755: p_effective_date => p_effective_date,
1756: p_object_version_number => p_object_version_number);
1757: --
1758: if (l_api_updating
1759: and nvl(p_lwr_lmt_calc_rl,hr_api.g_number)
1760: <> ben_apr_shd.g_old_rec.lwr_lmt_calc_rl
1761: or not l_api_updating)
1762: and p_lwr_lmt_calc_rl is not null then
1763: --
1786: --
1787: end if;
1788: --
1789: if (l_api_updating
1790: and nvl(p_upr_lmt_calc_rl,hr_api.g_number)
1791: <> ben_apr_shd.g_old_rec.upr_lmt_calc_rl
1792: or not l_api_updating)
1793: and p_upr_lmt_calc_rl is not null then
1794: --
1818: end if;
1819: --
1820: --
1821: if (l_api_updating
1822: and nvl(p_prtl_mo_det_mthd_rl,hr_api.g_number)
1823: <> ben_apr_shd.g_old_rec.prtl_mo_det_mthd_rl
1824: or not l_api_updating)
1825: and p_prtl_mo_det_mthd_rl is not null then
1826: --
1961: --
1962: -- {End Of Comments}
1963: -- ----------------------------------------------------------------------------
1964: Procedure dt_update_validate
1965: (p_comp_lvl_fctr_id in number default hr_api.g_number,
1966: p_datetrack_mode in varchar2,
1967: p_validation_start_date in date,
1968: p_validation_end_date in date) Is
1969: --
1975: hr_utility.set_location('Entering:'||l_proc, 5);
1976: --
1977: -- Ensure that the p_datetrack_mode argument is not null
1978: --
1979: hr_api.mandatory_arg_error
1980: (p_api_name => l_proc,
1981: p_argument => 'datetrack_mode',
1982: p_argument_value => p_datetrack_mode);
1983: --
1987: --
1988: --
1989: -- Ensure the arguments are not null
1990: --
1991: hr_api.mandatory_arg_error
1992: (p_api_name => l_proc,
1993: p_argument => 'validation_start_date',
1994: p_argument_value => p_validation_start_date);
1995: --
1992: (p_api_name => l_proc,
1993: p_argument => 'validation_start_date',
1994: p_argument_value => p_validation_start_date);
1995: --
1996: hr_api.mandatory_arg_error
1997: (p_api_name => l_proc,
1998: p_argument => 'validation_end_date',
1999: p_argument_value => p_validation_end_date);
2000: --
1998: p_argument => 'validation_end_date',
1999: p_argument_value => p_validation_end_date);
2000: --
2001: /*
2002: If ((nvl(p_comp_lvl_fctr_id, hr_api.g_number) <> hr_api.g_number) and
2003: NOT (dt_api.check_min_max_dates
2004: (p_base_table_name => 'ben_comp_lvl_fctr',
2005: p_base_key_column => 'comp_lvl_fctr_id',
2006: p_base_key_value => p_comp_lvl_fctr_id,
2081: hr_utility.set_location('Entering:'||l_proc, 5);
2082: --
2083: -- Ensure that the p_datetrack_mode argument is not null
2084: --
2085: hr_api.mandatory_arg_error
2086: (p_api_name => l_proc,
2087: p_argument => 'datetrack_mode',
2088: p_argument_value => p_datetrack_mode);
2089: --
2095: --
2096: --
2097: -- Ensure the arguments are not null
2098: --
2099: hr_api.mandatory_arg_error
2100: (p_api_name => l_proc,
2101: p_argument => 'validation_start_date',
2102: p_argument_value => p_validation_start_date);
2103: --
2100: (p_api_name => l_proc,
2101: p_argument => 'validation_start_date',
2102: p_argument_value => p_validation_start_date);
2103: --
2104: hr_api.mandatory_arg_error
2105: (p_api_name => l_proc,
2106: p_argument => 'validation_end_date',
2107: p_argument_value => p_validation_end_date);
2108: --
2105: (p_api_name => l_proc,
2106: p_argument => 'validation_end_date',
2107: p_argument_value => p_validation_end_date);
2108: --
2109: hr_api.mandatory_arg_error
2110: (p_api_name => l_proc,
2111: p_argument => 'actl_prem_id',
2112: p_argument_value => p_actl_prem_id);
2113: --
2232: (p_actl_prem_id => p_actl_prem_id,
2233: p_effective_date => p_effective_date,
2234: p_object_version_number => p_object_version_number);
2235: if (l_api_updating and
2236: (nvl(p_mlt_cd,hr_api.g_varchar2)
2237: <> nvl(ben_apr_shd.g_old_rec.mlt_cd,hr_api.g_varchar2) or
2238: nvl(p_val,hr_api.g_number)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2233: p_effective_date => p_effective_date,
2234: p_object_version_number => p_object_version_number);
2235: if (l_api_updating and
2236: (nvl(p_mlt_cd,hr_api.g_varchar2)
2237: <> nvl(ben_apr_shd.g_old_rec.mlt_cd,hr_api.g_varchar2) or
2238: nvl(p_val,hr_api.g_number)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2234: p_object_version_number => p_object_version_number);
2235: if (l_api_updating and
2236: (nvl(p_mlt_cd,hr_api.g_varchar2)
2237: <> nvl(ben_apr_shd.g_old_rec.mlt_cd,hr_api.g_varchar2) or
2238: nvl(p_val,hr_api.g_number)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2235: if (l_api_updating and
2236: (nvl(p_mlt_cd,hr_api.g_varchar2)
2237: <> nvl(ben_apr_shd.g_old_rec.mlt_cd,hr_api.g_varchar2) or
2238: nvl(p_val,hr_api.g_number)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2236: (nvl(p_mlt_cd,hr_api.g_varchar2)
2237: <> nvl(ben_apr_shd.g_old_rec.mlt_cd,hr_api.g_varchar2) or
2238: nvl(p_val,hr_api.g_number)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2237: <> nvl(ben_apr_shd.g_old_rec.mlt_cd,hr_api.g_varchar2) or
2238: nvl(p_val,hr_api.g_number)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2245: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2) or
2238: nvl(p_val,hr_api.g_number)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2245: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2) or
2246: nvl(p_bnft_rt_typ_cd,hr_api.g_varchar2)
2239: <> nvl(ben_apr_shd.g_old_rec.val,hr_api.g_number) or
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2245: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2) or
2246: nvl(p_bnft_rt_typ_cd,hr_api.g_varchar2)
2247: <> nvl(ben_apr_shd.g_old_rec.bnft_rt_typ_cd,hr_api.g_varchar2)
2240: nvl(p_pl_id,hr_api.g_number)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2245: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2) or
2246: nvl(p_bnft_rt_typ_cd,hr_api.g_varchar2)
2247: <> nvl(ben_apr_shd.g_old_rec.bnft_rt_typ_cd,hr_api.g_varchar2)
2248: ) or not l_api_updating)
2241: <> nvl(ben_apr_shd.g_old_rec.pl_id,hr_api.g_number) or
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2245: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2) or
2246: nvl(p_bnft_rt_typ_cd,hr_api.g_varchar2)
2247: <> nvl(ben_apr_shd.g_old_rec.bnft_rt_typ_cd,hr_api.g_varchar2)
2248: ) or not l_api_updating)
2249: then
2242: nvl(p_oipl_id,hr_api.g_number)
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2245: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2) or
2246: nvl(p_bnft_rt_typ_cd,hr_api.g_varchar2)
2247: <> nvl(ben_apr_shd.g_old_rec.bnft_rt_typ_cd,hr_api.g_varchar2)
2248: ) or not l_api_updating)
2249: then
2250: if p_mlt_cd is NULL then
2243: <> nvl(ben_apr_shd.g_old_rec.oipl_id,hr_api.g_number) or
2244: nvl(p_rt_typ_cd,hr_api.g_varchar2)
2245: <> nvl(ben_apr_shd.g_old_rec.rt_typ_cd,hr_api.g_varchar2) or
2246: nvl(p_bnft_rt_typ_cd,hr_api.g_varchar2)
2247: <> nvl(ben_apr_shd.g_old_rec.bnft_rt_typ_cd,hr_api.g_varchar2)
2248: ) or not l_api_updating)
2249: then
2250: if p_mlt_cd is NULL then
2251: fnd_message.set_name('BEN','BEN_91535_MLT_CD_RQD');
2309: --
2310: -- Call all supporting business operations
2311: --
2312: --
2313: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
2314: --
2315: chk_actl_prem_id
2316: (p_actl_prem_id => p_rec.actl_prem_id,
2317: p_effective_date => p_effective_date,
2482: --
2483: -- Call all supporting business operations
2484: --
2485: --
2486: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
2487: --
2488: chk_actl_prem_id
2489: (p_actl_prem_id => p_rec.actl_prem_id,
2490: p_effective_date => p_effective_date,
2712: hr_utility.set_location('Entering:'|| l_proc, 10);
2713: --
2714: -- Ensure that all the mandatory parameter are not null
2715: --
2716: hr_api.mandatory_arg_error(p_api_name => l_proc,
2717: p_argument => 'actl_prem_id',
2718: p_argument_value => p_actl_prem_id);
2719: --
2720: open csr_leg_code;