48: AND ppt.person_type_Id = p_person_type_id;
49: BEGIN
50:
51: /* Added for GSI Bug 5472781 */
52: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
53: v_field := NULL;
54: v_len_field := NULL;
55: g_type := NULL;
56: g_per_type := NULL;
129: END IF;
130: IF v_len_field IS NOT NULL THEN
131: fnd_message.set_name('PER', 'HR_377418_AE_INVALID_LENGTH');
132: fnd_message.set_token('FIELD',v_len_field, translate => true );
133: hr_utility.raise_error;
134: END IF;
135:
136: --Validate not null fields
137: IF g_per_type = 'Y' THEN
181: --End Bug 13575401
182: IF v_field IS NOT NULL THEN
183: fnd_message.set_name('PER', 'PQH_FR_MANDATORY_MSG');
184: fnd_message.set_token('NAME',v_field, translate => true );
185: hr_utility.raise_error;
186: END IF;
187:
188: DECLARE
189: CURSOR csr_get_loc_nat IS
203: CLOSE csr_get_loc_nat;
204: --IF p_nationality <> NVL(l_local_nationality,'*') AND p_per_information9 IS NOT NULL THEN
205: IF p_per_information18 <> NVL(l_local_nationality,'*') AND (p_per_information9 IS NOT NULL AND p_per_information9 <> hr_api.g_varchar2) THEN
206: IF (p_per_information16 IS NOT NULL AND p_per_information16 <> hr_api.g_varchar2) OR (p_per_information17 IS NOT NULL AND p_per_information17 <> hr_api.g_varchar2) THEN
207: hr_utility.set_message(800, 'HR_377410_AE_DAT_REA_INVALID');
208: hr_utility.raise_error;
209: END IF;
210: END IF;
211: END;
204: --IF p_nationality <> NVL(l_local_nationality,'*') AND p_per_information9 IS NOT NULL THEN
205: IF p_per_information18 <> NVL(l_local_nationality,'*') AND (p_per_information9 IS NOT NULL AND p_per_information9 <> hr_api.g_varchar2) THEN
206: IF (p_per_information16 IS NOT NULL AND p_per_information16 <> hr_api.g_varchar2) OR (p_per_information17 IS NOT NULL AND p_per_information17 <> hr_api.g_varchar2) THEN
207: hr_utility.set_message(800, 'HR_377410_AE_DAT_REA_INVALID');
208: hr_utility.raise_error;
209: END IF;
210: END IF;
211: END;
212:
255: OPEN csr_val_mar_status(l_bg_id);
256: FETCH csr_val_mar_status INTO l_valid;
257: CLOSE csr_val_mar_status;
258: IF l_valid IS NULL THEN
259: hr_utility.set_message(800, 'HR_377405_AE_INVALID_MAR');
260: hr_utility.raise_error;
261: END IF;
262: END IF;
263: END;
256: FETCH csr_val_mar_status INTO l_valid;
257: CLOSE csr_val_mar_status;
258: IF l_valid IS NULL THEN
259: hr_utility.set_message(800, 'HR_377405_AE_INVALID_MAR');
260: hr_utility.raise_error;
261: END IF;
262: END IF;
263: END;
264:
351: ,p_per_information19 => p_per_information19
352: ,p_per_information20 => p_per_information20);
353: END IF;
354: /* Added for GSI Bug 5472781 */
355: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
356: if g_type IS NOT NULL THEN
357: if p_per_information_category = 'AE' and (p_per_information10 is not null AND p_per_information10 <> hr_api.g_varchar2) then
358: --
359: -- Check that the religion exists in hr_lookups for the
367: ,p_lookup_code => p_per_information10
368: )
369: then
370: --
371: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
372: hr_utility.raise_error;
373: --
374: end if;
375: end if;
368: )
369: then
370: --
371: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
372: hr_utility.raise_error;
373: --
374: end if;
375: end if;
376:
387: ,p_lookup_code => p_per_information9
388: )
389: then
390: --
391: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
392: hr_utility.raise_error;
393: --
394: end if;
395: end if;
388: )
389: then
390: --
391: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
392: hr_utility.raise_error;
393: --
394: end if;
395: end if;
396:
469: ,p_per_information19 => p_per_information19
470: ,p_per_information20 => p_per_information20);
471:
472: /* Added for GSI Bug 5472781 */
473: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
474:
475: if g_type IS NOT NULL THEN
476: if p_per_information_category = 'AE' and (p_per_information10 is not null AND p_per_information10 <> hr_api.g_varchar2) then
477: --
486: ,p_lookup_code => p_per_information10
487: )
488: then
489: --
490: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
491: hr_utility.raise_error;
492: --
493: end if;
494: end if;
487: )
488: then
489: --
490: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
491: hr_utility.raise_error;
492: --
493: end if;
494: end if;
495:
506: ,p_lookup_code => p_per_information9
507: )
508: then
509: --
510: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
511: hr_utility.raise_error;
512: --
513: end if;
514: end if;
507: )
508: then
509: --
510: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
511: hr_utility.raise_error;
512: --
513: end if;
514: end if;
515: end if;
589: ,p_per_information19 => p_per_information19
590: ,p_per_information20 => p_per_information20);
591:
592: /* Added for GSI Bug 5472781 */
593: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
594:
595: if g_type IS NOT NULL THEN
596: if p_per_information_category = 'AE' and (p_per_information10 is not null AND p_per_information10 <> hr_api.g_varchar2) then
597: --
606: ,p_lookup_code => p_per_information10
607: )
608: then
609: --
610: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
611: hr_utility.raise_error;
612: --
613: end if;
614: end if;
607: )
608: then
609: --
610: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
611: hr_utility.raise_error;
612: --
613: end if;
614: end if;
615:
626: ,p_lookup_code => p_per_information9
627: )
628: then
629: --
630: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
631: hr_utility.raise_error;
632: --
633: end if;
634: end if;
627: )
628: then
629: --
630: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
631: hr_utility.raise_error;
632: --
633: end if;
634: end if;
635: end if;
707: ,p_per_information19 => p_per_information19
708: ,p_per_information20 => p_per_information20);
709:
710: /* Added for GSI Bug 5472781 */
711: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
712:
713: if g_type IS NOT NULL THEN
714: if p_per_information_category = 'AE' and (p_per_information10 is not null AND p_per_information10 <> hr_api.g_varchar2) then
715: --
724: ,p_lookup_code => p_per_information10
725: )
726: then
727: --
728: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
729: hr_utility.raise_error;
730: --
731: end if;
732: end if;
725: )
726: then
727: --
728: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
729: hr_utility.raise_error;
730: --
731: end if;
732: end if;
733:
744: ,p_lookup_code => p_per_information9
745: )
746: then
747: --
748: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
749: hr_utility.raise_error;
750: --
751: end if;
752: end if;
745: )
746: then
747: --
748: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
749: hr_utility.raise_error;
750: --
751: end if;
752: end if;
753: end if;
825: ,p_per_information19 => p_per_information19
826: ,p_per_information20 => p_per_information20);
827:
828: /* Added for GSI Bug 5472781 */
829: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
830:
831: if g_type IS NOT NULL THEN
832: if p_per_information_category = 'AE' and (p_per_information10 is not null AND p_per_information10 <> hr_api.g_varchar2) then
833: --
842: ,p_lookup_code => p_per_information10
843: )
844: then
845: --
846: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
847: hr_utility.raise_error;
848: --
849: end if;
850: end if;
843: )
844: then
845: --
846: hr_utility.set_message(800, 'HR_377401_AE_INVALID_RELIGION');
847: hr_utility.raise_error;
848: --
849: end if;
850: end if;
851:
862: ,p_lookup_code => p_per_information9
863: )
864: then
865: --
866: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
867: hr_utility.raise_error;
868: --
869: end if;
870: end if;
863: )
864: then
865: --
866: hr_utility.set_message(800, 'HR_377402_AE_INVALID_PREV_NAT');
867: hr_utility.raise_error;
868: --
869: end if;
870: end if;
871: end if;
890: --
891: BEGIN
892:
893: /* Added for GSI Bug 5472781 */
894: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
895: --
896: l_field := NULL;
897: --
898: IF p_ctr_information_category = '' THEN
906: (p_effective_date => p_effective_date
907: ,p_lookup_type => 'AE_EMPLOYMENT_STATUS'
908: ,p_lookup_code => p_ctr_information1) THEN
909: --
910: hr_utility.set_message(800, 'HR_377414_AE_INVALID_EMP_STAT');
911: hr_utility.raise_error;
912: --
913: END IF;
914: --
907: ,p_lookup_type => 'AE_EMPLOYMENT_STATUS'
908: ,p_lookup_code => p_ctr_information1) THEN
909: --
910: hr_utility.set_message(800, 'HR_377414_AE_INVALID_EMP_STAT');
911: hr_utility.raise_error;
912: --
913: END IF;
914: --
915: END IF;
918: --
919: IF (fnd_date.canonical_to_date(p_ctr_information2) < p_effective_date)
920: THEN
921: --
922: hr_utility.set_message(800, 'HR_377415_AE_EXPIRY_INVALID');
923: hr_utility.raise_error;
924: --
925: END IF;
926: --
919: IF (fnd_date.canonical_to_date(p_ctr_information2) < p_effective_date)
920: THEN
921: --
922: hr_utility.set_message(800, 'HR_377415_AE_EXPIRY_INVALID');
923: hr_utility.raise_error;
924: --
925: END IF;
926: --
927: END IF;
968: l_valid VARCHAR2(1);
969: BEGIN
970:
971: /* Added for GSI Bug 5472781 */
972: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
973:
974: l_valid := NULL;
975: IF (p_town_or_city IS NOT NULL AND p_town_or_city <> hr_api.g_varchar2) AND (p_address_line3 IS NOT NULL AND p_address_line3 <> hr_api.g_varchar2)THEN
976: OPEN csr_validate_address
978: FETCH csr_validate_address INTO l_valid;
979: CLOSE csr_validate_address;
980:
981: IF l_valid IS NULL THEN
982: hr_utility.set_message(800, 'HR_377403_AE_INVALID_CITY');
983: hr_utility.raise_error;
984: END IF;
985: END IF;
986: l_valid := NULL;
979: CLOSE csr_validate_address;
980:
981: IF l_valid IS NULL THEN
982: hr_utility.set_message(800, 'HR_377403_AE_INVALID_CITY');
983: hr_utility.raise_error;
984: END IF;
985: END IF;
986: l_valid := NULL;
987: IF (p_region_1 IS NOT NULL AND p_region_1 <> hr_api.g_varchar2) THEN --AND p_town_or_city IS NOT NULL THEN
989: ('AE_AREA_VALIDATION',p_region_1,'CITY CODE',p_town_or_city);
990: FETCH csr_validate_address INTO l_valid;
991: CLOSE csr_validate_address;
992: IF l_valid IS NULL THEN
993: hr_utility.set_message(800, 'HR_377404_AE_INVALID_AREA');
994: hr_utility.raise_error;
995: END IF;
996: END IF;
997: END IF;
990: FETCH csr_validate_address INTO l_valid;
991: CLOSE csr_validate_address;
992: IF l_valid IS NULL THEN
993: hr_utility.set_message(800, 'HR_377404_AE_INVALID_AREA');
994: hr_utility.raise_error;
995: END IF;
996: END IF;
997: END IF;
998: END validate_address;
1015:
1016: l_bg_id number;
1017: BEGIN
1018: /* Added for GSI Bug 5472781 */
1019: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1020:
1021: OPEN csr_fetch_bus_id;
1022: FETCH csr_fetch_bus_id INTO l_bg_id;
1023: CLOSE csr_fetch_bus_id;
1061: --
1062: BEGIN
1063:
1064: /* Added for GSI Bug 5472781 */
1065: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1066: --
1067: OPEN csr_get_style(p_address_id);
1068: FETCH csr_get_style INTO l_style,l_person_id;
1069: CLOSE csr_get_style;
1097:
1098: BEGIN
1099:
1100: /* Added for GSI Bug 5472781 */
1101: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1102: IF p_style = 'AE' THEN
1103: validate_address
1104: (p_business_group_id => p_business_group_id
1105: ,p_effective_date => p_effective_date
1131: l_bg_id number;
1132: BEGIN
1133:
1134: /* Added for GSI Bug 5472781 */
1135: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1136: --
1137:
1138: open csr_fetch_bus_id;
1139: FETCH csr_fetch_bus_id INTO l_bg_id;
1164:
1165: BEGIN
1166:
1167: /* Added for GSI Bug 5472781 */
1168: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1169:
1170: IF (p_segment2 IS NOT NULL AND p_segment2 <> hr_api.g_varchar2) AND p_segment3 IS NULL THEN
1171: hr_utility.set_message(800, 'HR_377409_AE_SOC_SEC_REQ');
1172: hr_utility.raise_error;
1167: /* Added for GSI Bug 5472781 */
1168: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1169:
1170: IF (p_segment2 IS NOT NULL AND p_segment2 <> hr_api.g_varchar2) AND p_segment3 IS NULL THEN
1171: hr_utility.set_message(800, 'HR_377409_AE_SOC_SEC_REQ');
1172: hr_utility.raise_error;
1173: END IF;
1174:
1175: IF p_segment5 IS NOT NULL AND p_segment5 <> hr_api.g_varchar2 THEN
1168: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1169:
1170: IF (p_segment2 IS NOT NULL AND p_segment2 <> hr_api.g_varchar2) AND p_segment3 IS NULL THEN
1171: hr_utility.set_message(800, 'HR_377409_AE_SOC_SEC_REQ');
1172: hr_utility.raise_error;
1173: END IF;
1174:
1175: IF p_segment5 IS NOT NULL AND p_segment5 <> hr_api.g_varchar2 THEN
1176: DECLARE
1189: FETCH csr_chk_qual INTO rec_chk_qual;
1190: l_exist := rec_chk_qual.person_id;
1191: CLOSE csr_chk_qual;
1192: IF l_exist IS NULL THEN
1193: hr_utility.set_message(800, 'HR_377408_AE_INVALID_QUAL');
1194: hr_utility.raise_error;
1195: END IF;
1196: END;
1197: END IF;
1190: l_exist := rec_chk_qual.person_id;
1191: CLOSE csr_chk_qual;
1192: IF l_exist IS NULL THEN
1193: hr_utility.set_message(800, 'HR_377408_AE_INVALID_QUAL');
1194: hr_utility.raise_error;
1195: END IF;
1196: END;
1197: END IF;
1198: END IF;
1209: l_count NUMBER;
1210: BEGIN
1211:
1212: /* Added for GSI Bug 5472781 */
1213: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1214:
1215: l_count := 0;
1216: IF p_dis_information_category = 'AE' and NVL(p_dis_information1,'N') = 'Y' THEN
1217: /*Check that Relevant to Social Security is not set to Yes for more than 1 disability in the same period*/
1223: AND dis_information_category = 'AE'
1224: AND dis_information1 = 'Y';
1225: IF l_count > 0 THEN
1226: fnd_message.set_name('PER', 'HR_377411_AE_INVALID_DIS_SSN');
1227: hr_utility.raise_error;
1228: END IF;
1229: END IF;
1230: END IF;
1231: END CREATE_DISABILITY_VALIDATE;
1242: l_count NUMBER;
1243: BEGIN
1244:
1245: /* Added for GSI Bug 5472781 */
1246: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1247:
1248: l_count := 0;
1249: SELECT person_id
1250: INTO l_person_id
1262: AND dis_information_category = 'AE'
1263: AND dis_information1 = 'Y';
1264: IF l_count > 0 THEN
1265: fnd_message.set_name('PER', 'HR_377411_AE_INVALID_DIS_SSN');
1266: hr_utility.raise_error;
1267: END IF;
1268: END IF;
1269: END IF;
1270: END UPDATE_DISABILITY_VALIDATE;
1281: l_count number;
1282:
1283: BEGIN
1284: /* Added for GSI Bug 5472781 */
1285: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1286:
1287: l_count := 0;
1288:
1289: IF NVL(P_PPM_INFORMATION1,'N') = 'Y' THEN
1300: AND PPM_INFORMATION1 = 'Y';
1301:
1302: IF l_count >= 1 THEN
1303: fnd_message.set_name('PER', 'HR_377444_AE_INVALID_EOS_FLAG');
1304: hr_utility.raise_error;
1305: END IF;
1306:
1307: END IF;
1308:
1319: l_assignment_id number;
1320:
1321: BEGIN
1322: /* Added for GSI Bug 5472781 */
1323: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1324:
1325: l_count := 0;
1326:
1327: SELECT ASSIGNMENT_ID
1343: AND PPM_INFORMATION1 = 'Y';
1344:
1345: IF l_count > 0 THEN
1346: fnd_message.set_name('PER', 'HR_377444_AE_INVALID_EOS_FLAG');
1347: hr_utility.raise_error;
1348: END IF;
1349:
1350: END IF;
1351:
1366:
1367: BEGIN
1368:
1369: /* Added for GSI Bug 5472781 */
1370: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1371:
1372: v_field := NULL;
1373: IF p_pem_information_category = 'AE' then
1374: IF p_employer_name is null then
1379: END IF;
1380:
1381: fnd_message.set_name('PER', 'PQH_FR_MANDATORY_MSG');
1382: fnd_message.set_token('NAME',v_field, translate => true );
1383: hr_utility.raise_error;
1384: END IF;
1385:
1386: IF (p_pem_information1 IS NOT NULL AND p_pem_information1 <> hr_api.g_varchar2) THEN
1387: IF hr_api.not_exists_in_hr_lookups
1389: ,p_lookup_type => 'LEAV_REAS'
1390: ,p_lookup_code => p_pem_information1
1391: )
1392: THEN
1393: hr_utility.set_message(800, 'HR_377417_AE_INVALID_LEAV_REAS');
1394: hr_utility.raise_error;
1395: END IF;
1396: END IF;
1397: END IF;
1390: ,p_lookup_code => p_pem_information1
1391: )
1392: THEN
1393: hr_utility.set_message(800, 'HR_377417_AE_INVALID_LEAV_REAS');
1394: hr_utility.raise_error;
1395: END IF;
1396: END IF;
1397: END IF;
1398: END IF;
1425:
1426: BEGIN
1427:
1428: /* Added for GSI Bug 5472781 */
1429: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1430:
1431: v_field := NULL;
1432: l_length := 0;
1433:
1441: END IF;
1442:
1443: fnd_message.set_name('PER', 'PQH_FR_MANDATORY_MSG');
1444: fnd_message.set_token('NAME',v_field, translate => true );
1445: hr_utility.raise_error;
1446: END IF;
1447:
1448: IF (p_org_information1 IS NOT NULL AND p_org_information1 <> hr_api.g_varchar2) THEN
1449:
1450: l_length := LENGTH(p_org_information1);
1451:
1452: IF(l_length > 12) THEN
1453: fnd_message.set_name('PER', 'HR_377407_AE_INVALID_SOC_SEC');
1454: hr_utility.raise_error;
1455: END IF;
1456: END IF;
1457:
1458: END IF;
1485:
1486: BEGIN
1487:
1488: /* Added for GSI Bug 5472781 */
1489: IF hr_utility.chk_product_install('Oracle Human Resources', 'AE') THEN
1490:
1491: l_length := 0;
1492: l_var1 := 0;
1493: v_field := NULL;
1502: END IF;
1503:
1504: fnd_message.set_name('PER', 'PQH_FR_MANDATORY_MSG');
1505: fnd_message.set_token('NAME',v_field, translate => true );
1506: hr_utility.raise_error;
1507: END IF;
1508:
1509: IF (p_org_information1 IS NOT NULL AND p_org_information1 <> hr_api.g_varchar2) THEN
1510:
1511: l_length := LENGTH(p_org_information1);
1512:
1513: IF(l_length > 12) THEN
1514: fnd_message.set_name('PER', 'HR_377407_AE_INVALID_SOC_SEC');
1515: hr_utility.raise_error;
1516: END IF;
1517: END IF;
1518:
1519: END IF;