109: p_ler_id => p_ler_id,
110: p_object_version_number => p_object_version_number);
111: --
112: if (l_api_updating
113: and nvl(p_ler_id,hr_api.g_number)
114: <> ben_ler_shd.g_old_rec.ler_id) then
115: --
116: -- raise error as PK has changed
117: --
344: p_object_version_number => p_object_version_number);
345: --
346: if (l_api_updating
347: and p_whn_to_prcs_cd
348: <> nvl(ben_ler_shd.g_old_rec.whn_to_prcs_cd,hr_api.g_varchar2)
349: or not l_api_updating)
350: and p_whn_to_prcs_cd is not null then
351: --
352: -- check if value of lookup falls within lookup type.
350: and p_whn_to_prcs_cd is not null then
351: --
352: -- check if value of lookup falls within lookup type.
353: --
354: if hr_api.not_exists_in_hr_lookups
355: (p_lookup_type => 'BEN_WHN_TO_PRCS_LER',
356: p_lookup_code => p_whn_to_prcs_cd,
357: p_effective_date => p_effective_date) then
358: --
426: p_effective_date => p_effective_date,
427: p_object_version_number => p_object_version_number);
428: --
429: if (l_api_updating
430: and nvl(p_ler_eval_rl,hr_api.g_number)
431: <> ben_ler_shd.g_old_rec.ler_eval_rl
432: or not l_api_updating)
433: and p_ler_eval_rl is not null then
434: --
503: p_object_version_number => p_object_version_number);
504: --
505: if (l_api_updating
506: and p_ptnl_ler_trtmt_cd
507: <> nvl(ben_ler_shd.g_old_rec.ptnl_ler_trtmt_cd,hr_api.g_varchar2)
508: or not l_api_updating)
509: and p_ptnl_ler_trtmt_cd is not null then
510: --
511: -- check if value of lookup falls within lookup type.
509: and p_ptnl_ler_trtmt_cd is not null then
510: --
511: -- check if value of lookup falls within lookup type.
512: --
513: if hr_api.not_exists_in_hr_lookups
514: (p_lookup_type => 'BEN_PTNL_LER_TRTMT',
515: p_lookup_code => p_ptnl_ler_trtmt_cd,
516: p_effective_date => p_effective_date) then
517: --
579: p_object_version_number => p_object_version_number);
580: --
581: if ( ( l_api_updating
582: and ( p_ptnl_ler_trtmt_cd
583: <> nvl(ben_ler_shd.g_old_rec.ptnl_ler_trtmt_cd,hr_api.g_varchar2)
584: or p_typ_cd
585: <> nvl(ben_ler_shd.g_old_rec.typ_cd,hr_api.g_varchar2)
586: )
587: )
581: if ( ( l_api_updating
582: and ( p_ptnl_ler_trtmt_cd
583: <> nvl(ben_ler_shd.g_old_rec.ptnl_ler_trtmt_cd,hr_api.g_varchar2)
584: or p_typ_cd
585: <> nvl(ben_ler_shd.g_old_rec.typ_cd,hr_api.g_varchar2)
586: )
587: )
588: or not l_api_updating)
589: and p_ptnl_ler_trtmt_cd is not null then
671: p_object_version_number => p_object_version_number);
672: --
673: if (l_api_updating
674: and p_lf_evt_oper_cd
675: <> nvl(ben_ler_shd.g_old_rec.lf_evt_oper_cd,hr_api.g_varchar2)
676: or not l_api_updating)
677: and p_lf_evt_oper_cd is not null then
678: --
679: -- check if value of lookup falls within lookup type.
677: and p_lf_evt_oper_cd is not null then
678: --
679: -- check if value of lookup falls within lookup type.
680: --
681: if hr_api.not_exists_in_hr_lookups
682: (p_lookup_type => 'BEN_LF_EVT_OPER',
683: p_lookup_code => p_lf_evt_oper_cd,
684: p_effective_date => p_effective_date) then
685: --
803: p_object_version_number => p_object_version_number);
804: --
805: if (l_api_updating
806: and p_slctbl_slf_svc_cd
807: <> nvl(ben_ler_shd.g_old_rec.slctbl_slf_svc_cd ,hr_api.g_varchar2)
808: or not l_api_updating)
809: and p_slctbl_slf_svc_cd is not null then
810: --
811: -- check if value of lookup falls within lookup type.
809: and p_slctbl_slf_svc_cd is not null then
810: --
811: -- check if value of lookup falls within lookup type.
812: --
813: if hr_api.not_exists_in_hr_lookups
814: (p_lookup_type => 'BEN_SLCTBL_SLF_SVC_CD',
815: p_lookup_code => p_slctbl_slf_svc_cd ,
816: p_effective_date => p_effective_date) then
817: --
866: --
867: CURSOR l_csr_ler IS
868: SELECT 'x'
869: FROM ben_ler_f
870: WHERE typ_cd = nvl(p_typ_cd, hr_api.g_varchar2)
871: AND business_group_id + 0 = p_business_group_id
872: AND effective_end_date >= p_validation_start_date
873: AND effective_start_date <= p_validation_end_date ;
874: --
888: --
889: if (l_api_updating and
890: ben_ler_shd.g_old_rec.typ_cd in ('DRVDAGE', 'DRVDLOS', 'DRVDCAL',
891: 'DRVDHRW', 'DRVDCMP', 'DRVDTPF', 'QMSCOCO', 'QDROCOU', 'QUAINGR')
892: and nvl(p_typ_cd,hr_api.g_varchar2) <> ben_ler_shd.g_old_rec.typ_cd) then
893: --
894: -- The user is not allowed to change Life Event TYPE of derived types.
895: --
896: fnd_message.set_name('BEN','BEN_91423_DELIVERED_TYPE_CHG');
896: fnd_message.set_name('BEN','BEN_91423_DELIVERED_TYPE_CHG');
897: fnd_message.raise_error;
898: end if;
899:
900: if nvl(p_typ_cd,hr_api.g_varchar2)
901: <> nvl(ben_ler_shd.g_old_rec.typ_cd,hr_api.g_varchar2)
902: and
903: p_typ_cd in ('DRVDAGE', 'DRVDLOS', 'DRVDCAL',
904: 'DRVDHRW', 'DRVDCMP', 'DRVDTPF', 'SCHEDDO','SCHEDDA','SCHEDDU',
897: fnd_message.raise_error;
898: end if;
899:
900: if nvl(p_typ_cd,hr_api.g_varchar2)
901: <> nvl(ben_ler_shd.g_old_rec.typ_cd,hr_api.g_varchar2)
902: and
903: p_typ_cd in ('DRVDAGE', 'DRVDLOS', 'DRVDCAL',
904: 'DRVDHRW', 'DRVDCMP', 'DRVDTPF', 'SCHEDDO','SCHEDDA','SCHEDDU',
905: 'QMSCOCO', 'QDROCOU', 'QUAINGR') then -- GSP Rate Synchronization : Removed GSP
929:
930:
931: if (l_api_updating
932: and p_typ_cd
933: <> nvl(ben_ler_shd.g_old_rec.typ_cd,hr_api.g_varchar2)
934: or not l_api_updating)
935: and p_typ_cd is not null then
936: --
937: -- check if value of lookup falls within lookup type.
935: and p_typ_cd is not null then
936: --
937: -- check if value of lookup falls within lookup type.
938: --
939: if hr_api.not_exists_in_hr_lookups
940: (p_lookup_type => 'BEN_LER_TYP',
941: p_lookup_code => p_typ_cd,
942: p_effective_date => p_effective_date) then
943: --
952: --
953: -- Only allow the Type Code to change if the record is not being used in any
954: -- foreign keys. CAN change the type from null to something though.
955: if (l_api_updating
956: and nvl(p_typ_cd,hr_api.g_varchar2)
957: <> nvl(ben_ler_shd.g_old_rec.typ_cd,hr_api.g_varchar2)
958: and ben_ler_shd.g_old_rec.typ_cd is not null) then
959: --
960: -- Call a routine to check to see if any child rows exist. This
953: -- Only allow the Type Code to change if the record is not being used in any
954: -- foreign keys. CAN change the type from null to something though.
955: if (l_api_updating
956: and nvl(p_typ_cd,hr_api.g_varchar2)
957: <> nvl(ben_ler_shd.g_old_rec.typ_cd,hr_api.g_varchar2)
958: and ben_ler_shd.g_old_rec.typ_cd is not null) then
959: --
960: -- Call a routine to check to see if any child rows exist. This
961: -- procedure will return an error message if any children exist.
1085: p_effective_date => p_effective_date,
1086: p_object_version_number => p_object_version_number);
1087: --
1088: if ( (l_api_updating
1089: and nvl(p_typ_cd,hr_api.g_varchar2) <> ben_ler_shd.g_old_rec.typ_cd
1090: or not l_api_updating )
1091: and p_typ_cd = 'IREC' )
1092: then
1093: --
1159: p_object_version_number => p_object_version_number);
1160: --
1161: if (l_api_updating
1162: and p_ck_rltd_per_elig_flag
1163: <> nvl(ben_ler_shd.g_old_rec.ck_rltd_per_elig_flag,hr_api.g_varchar2)
1164: or not l_api_updating)
1165: and p_ck_rltd_per_elig_flag is not null then
1166: --
1167: -- check if value of lookup falls within lookup type.
1165: and p_ck_rltd_per_elig_flag is not null then
1166: --
1167: -- check if value of lookup falls within lookup type.
1168: --
1169: if hr_api.not_exists_in_hr_lookups
1170: (p_lookup_type => 'YES_NO',
1171: p_lookup_code => p_ck_rltd_per_elig_flag,
1172: p_effective_date => p_effective_date) then
1173: --
1228: p_object_version_number => p_object_version_number);
1229: --
1230: if (l_api_updating
1231: and p_cm_aply_flag
1232: <> nvl(ben_ler_shd.g_old_rec.cm_aply_flag,hr_api.g_varchar2)
1233: or not l_api_updating)
1234: and p_cm_aply_flag is not null then
1235: --
1236: -- check if value of lookup falls within lookup type.
1234: and p_cm_aply_flag is not null then
1235: --
1236: -- check if value of lookup falls within lookup type.
1237: --
1238: if hr_api.not_exists_in_hr_lookups
1239: (p_lookup_type => 'YES_NO',
1240: p_lookup_code => p_cm_aply_flag,
1241: p_effective_date => p_effective_date) then
1242: --
1304: -- one time.
1305: CURSOR l_csr_ler IS
1306: SELECT name
1307: FROM ben_ler_f
1308: WHERE ler_id <> nvl(p_ler_id, hr_api.g_number)
1309: AND name = p_name
1310: AND business_group_id + 0 = p_business_group_id
1311: AND effective_end_date >= p_validation_start_date
1312: AND effective_start_date <= p_validation_end_date ;
1324: p_effective_date => p_effective_date,
1325: p_object_version_number => p_object_version_number);
1326:
1327: if (l_api_updating
1328: and nvl(p_name,hr_api.g_varchar2)
1329: <> ben_ler_shd.g_old_rec.name
1330: or not l_api_updating) then
1331:
1332: open l_csr_ler ;
1390: p_effective_date => p_effective_date,
1391: p_object_version_number => p_object_version_number);
1392:
1393: if (l_api_updating
1394: and nvl(p_ovridg_le_flag,hr_api.g_varchar2)
1395: <> ben_ler_shd.g_old_rec.ovridg_le_flag
1396: or not l_api_updating) then
1397: --
1398: -- check if value of lookup falls within lookup type.
1396: or not l_api_updating) then
1397: --
1398: -- check if value of lookup falls within lookup type.
1399: --
1400: if hr_api.not_exists_in_hr_lookups
1401: (p_lookup_type => 'YES_NO',
1402: p_lookup_code => p_ovridg_le_flag,
1403: p_effective_date => p_effective_date) then
1404: --
1462: p_effective_date => p_effective_date,
1463: p_object_version_number => p_object_version_number);
1464:
1465: if (l_api_updating
1466: and nvl(p_qualg_evt_flag,hr_api.g_varchar2)
1467: <> ben_ler_shd.g_old_rec.qualg_evt_flag
1468: or not l_api_updating) then
1469: --
1470: -- check if value of lookup falls within lookup type.
1468: or not l_api_updating) then
1469: --
1470: -- check if value of lookup falls within lookup type.
1471: --
1472: if hr_api.not_exists_in_hr_lookups
1473: (p_lookup_type => 'YES_NO',
1474: p_lookup_code => p_qualg_evt_flag,
1475: p_effective_date => p_effective_date) then
1476: --
1533: p_object_version_number => p_object_version_number);
1534: --
1535: if (l_api_updating
1536: and p_tmlns_eval_cd
1537: <> nvl(ben_ler_shd.g_old_rec.tmlns_eval_cd,hr_api.g_varchar2)
1538: or not l_api_updating)
1539: and p_tmlns_eval_cd is not null then
1540: --
1541: -- check if value of lookup falls within lookup type.
1539: and p_tmlns_eval_cd is not null then
1540: --
1541: -- check if value of lookup falls within lookup type.
1542: --
1543: if hr_api.not_exists_in_hr_lookups
1544: (p_lookup_type => 'BEN_LER_TMLNS_EVAL',
1545: p_lookup_code => p_tmlns_eval_cd,
1546: p_effective_date => p_effective_date) then
1547: --
1604: p_object_version_number => p_object_version_number);
1605: --
1606: if (l_api_updating
1607: and p_tmlns_perd_cd
1608: <> nvl(ben_ler_shd.g_old_rec.tmlns_perd_cd,hr_api.g_varchar2)
1609: or not l_api_updating)
1610: and p_tmlns_perd_cd is not null then
1611: --
1612: -- check if value of lookup falls within lookup type.
1610: and p_tmlns_perd_cd is not null then
1611: --
1612: -- check if value of lookup falls within lookup type.
1613: --
1614: if hr_api.not_exists_in_hr_lookups
1615: (p_lookup_type => 'BEN_LER_TMLNS_PERD',
1616: p_lookup_code => p_tmlns_perd_cd,
1617: p_effective_date => p_effective_date) then
1618: --
1675: p_object_version_number => p_object_version_number,
1676: p_effective_date => p_effective_date);
1677: --
1678: if (l_api_updating
1679: and nvl(p_tmlns_perd_rl,hr_api.g_number)
1680: <> ben_ler_shd.g_old_rec.tmlns_perd_rl
1681: or not l_api_updating)
1682: and p_tmlns_perd_rl is not null then
1683: --
1748: p_effective_date => p_effective_date,
1749: p_object_version_number => p_object_version_number);
1750: --
1751: if (l_api_updating
1752: and ( p_slctbl_slf_svc_cd <> nvl(ben_ler_shd.g_old_rec.slctbl_slf_svc_cd ,hr_api.g_varchar2)
1753: or p_qualg_evt_flag <> nvl(ben_ler_shd.g_old_rec.qualg_evt_flag , hr_api.g_varchar2) )
1754: or not l_api_updating)
1755: and p_slctbl_slf_svc_cd is not null then
1756: --
1749: p_object_version_number => p_object_version_number);
1750: --
1751: if (l_api_updating
1752: and ( p_slctbl_slf_svc_cd <> nvl(ben_ler_shd.g_old_rec.slctbl_slf_svc_cd ,hr_api.g_varchar2)
1753: or p_qualg_evt_flag <> nvl(ben_ler_shd.g_old_rec.qualg_evt_flag , hr_api.g_varchar2) )
1754: or not l_api_updating)
1755: and p_slctbl_slf_svc_cd is not null then
1756: --
1757: -- if value of p_slctbl_slf_svc_cd is in (COBRA , REGCOBRA) then p_qualg_evt_flag should be Y , else throw an error.
1803: --
1804: -- {End Of Comments}
1805: -- ----------------------------------------------------------------------------
1806: Procedure dt_update_validate
1807: (p_formula_id in number default hr_api.g_number,
1808: p_datetrack_mode in varchar2,
1809: p_validation_start_date in date,
1810: p_validation_end_date in date) Is
1811: --
1817: hr_utility.set_location('Entering:'||l_proc, 5);
1818: --
1819: -- Ensure that the p_datetrack_mode argument is not null
1820: --
1821: hr_api.mandatory_arg_error
1822: (p_api_name => l_proc,
1823: p_argument => 'datetrack_mode',
1824: p_argument_value => p_datetrack_mode);
1825: --
1829: --
1830: --
1831: -- Ensure the arguments are not null
1832: --
1833: hr_api.mandatory_arg_error
1834: (p_api_name => l_proc,
1835: p_argument => 'validation_start_date',
1836: p_argument_value => p_validation_start_date);
1837: --
1834: (p_api_name => l_proc,
1835: p_argument => 'validation_start_date',
1836: p_argument_value => p_validation_start_date);
1837: --
1838: hr_api.mandatory_arg_error
1839: (p_api_name => l_proc,
1840: p_argument => 'validation_end_date',
1841: p_argument_value => p_validation_end_date);
1842: --
1839: (p_api_name => l_proc,
1840: p_argument => 'validation_end_date',
1841: p_argument_value => p_validation_end_date);
1842: --
1843: If ((nvl(p_formula_id, hr_api.g_number) <> hr_api.g_number) and
1844: NOT (dt_api.check_min_max_dates
1845: (p_base_table_name => 'ff_formulas_f',
1846: p_base_key_column => 'formula_id',
1847: p_base_key_value => p_formula_id,
1917: hr_utility.set_location('Entering:'||l_proc, 5);
1918: --
1919: -- Ensure that the p_datetrack_mode argument is not null
1920: --
1921: hr_api.mandatory_arg_error
1922: (p_api_name => l_proc,
1923: p_argument => 'datetrack_mode',
1924: p_argument_value => p_datetrack_mode);
1925: --
1931: --
1932: --
1933: -- Ensure the arguments are not null
1934: --
1935: hr_api.mandatory_arg_error
1936: (p_api_name => l_proc,
1937: p_argument => 'validation_start_date',
1938: p_argument_value => p_validation_start_date);
1939: --
1936: (p_api_name => l_proc,
1937: p_argument => 'validation_start_date',
1938: p_argument_value => p_validation_start_date);
1939: --
1940: hr_api.mandatory_arg_error
1941: (p_api_name => l_proc,
1942: p_argument => 'validation_end_date',
1943: p_argument_value => p_validation_end_date);
1944: --
1941: (p_api_name => l_proc,
1942: p_argument => 'validation_end_date',
1943: p_argument_value => p_validation_end_date);
1944: --
1945: hr_api.mandatory_arg_error
1946: (p_api_name => l_proc,
1947: p_argument => 'ler_id',
1948: p_argument_value => p_ler_id);
1949: --
1995: --
1996: -- Call all supporting business operations
1997: --
1998: --
1999: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
2000: --
2001: chk_ler_id
2002: (p_ler_id => p_rec.ler_id,
2003: p_effective_date => p_effective_date,
2152: --
2153: -- Call all supporting business operations
2154: --
2155: --
2156: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
2157: --
2158: chk_ler_id
2159: (p_ler_id => p_rec.ler_id,
2160: p_effective_date => p_effective_date,
2347: hr_utility.set_location('Entering:'|| l_proc, 10);
2348: --
2349: -- Ensure that all the mandatory parameter are not null
2350: --
2351: hr_api.mandatory_arg_error(p_api_name => l_proc,
2352: p_argument => 'ler_id',
2353: p_argument_value => p_ler_id);
2354: --
2355: open csr_leg_code;