32: jp_school_rec per_jp_school_lookups%rowtype;
33:
34:
35: begin
36: hr_utility.set_location('Entering:'|| l_proc, 10);
37:
38: --
39: -- If school_id is not null, get school info with school_id.
40: --
38: --
39: -- If school_id is not null, get school info with school_id.
40: --
41: if p_school_id is not null then
42: hr_utility.set_location(l_proc, 20);
43: open c1;
44: fetch c1 into jp_school_rec;
45: if c1%notfound then
46: close c1;
43: open c1;
44: fetch c1 into jp_school_rec;
45: if c1%notfound then
46: close c1;
47: hr_utility.set_message(801, 'HR_72011_API_INVALID_SCL_ID');
48: hr_utility.raise_error;
49: end if;
50: close c1;
51:
44: fetch c1 into jp_school_rec;
45: if c1%notfound then
46: close c1;
47: hr_utility.set_message(801, 'HR_72011_API_INVALID_SCL_ID');
48: hr_utility.raise_error;
49: end if;
50: close c1;
51:
52: --
67: -- If school_name is not null, get school info
68: -- with p_school_name, p_major.
69: --
70: elsif p_school_name is not null then
71: hr_utility.set_location(l_proc, 30);
72: open c2;
73: fetch c2 into jp_school_rec;
74: if c2%notfound then
75: close c2;
72: open c2;
73: fetch c2 into jp_school_rec;
74: if c2%notfound then
75: close c2;
76: hr_utility.set_message(801, 'HR_72014_API_INVALID_NAME_MAJR');
77: hr_utility.raise_error;
78: end if;
79: --
80: -- Check dupulication
73: fetch c2 into jp_school_rec;
74: if c2%notfound then
75: close c2;
76: hr_utility.set_message(801, 'HR_72014_API_INVALID_NAME_MAJR');
77: hr_utility.raise_error;
78: end if;
79: --
80: -- Check dupulication
81: --
81: --
82: fetch c2 into jp_school_rec;
83: if c2%found then
84: close c2;
85: hr_utility.set_message(801, 'HR_72014_API_INVALID_NAME_MAJR');
86: hr_utility.raise_error;
87: end if;
88: close c2;
89:
82: fetch c2 into jp_school_rec;
83: if c2%found then
84: close c2;
85: hr_utility.set_message(801, 'HR_72014_API_INVALID_NAME_MAJR');
86: hr_utility.raise_error;
87: end if;
88: close c2;
89:
90: --
95: --
96: -- both school_id and school_name is null
97: --
98: else
99: hr_utility.set_message(801, 'HR_72015_API_SCL_ID_NAME_NULL');
100: hr_utility.raise_error;
101: end if;
102:
103: --
96: -- both school_id and school_name is null
97: --
98: else
99: hr_utility.set_message(801, 'HR_72015_API_SCL_ID_NAME_NULL');
100: hr_utility.raise_error;
101: end if;
102:
103: --
104: -- If p_school_name_kana is null, set the school name kana.
114: p_major_kana := jp_school_rec.major_kana;
115: end if;
116: --
117: --
118: hr_utility.set_location('Leaving:'|| l_proc, 40);
119: end chk_school_id_school_name_comb;
120: --
121: -- ----------------------------------------------------------------------------
122: -- |-----------------------------< create_jp_educ_sit >-----------------------|
201: where pbg.business_group_id = p_business_group_id;
202: --
203:
204: begin
205: hr_utility.set_location('Entering:'|| l_proc, 5);
206: --
207: -- Validation in addition to Table Handlers
208: --
209: -- Check that the specified business group is valid.
207: -- Validation in addition to Table Handlers
208: --
209: -- Check that the specified business group is valid.
210: --
211: hr_utility.set_location(l_proc, 10);
212: open csr_bg;
213: fetch csr_bg into l_legislation_code;
214: if csr_bg%notfound then
215: close csr_bg;
212: open csr_bg;
213: fetch csr_bg into l_legislation_code;
214: if csr_bg%notfound then
215: close csr_bg;
216: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
217: hr_utility.raise_error;
218: else
219: if l_legislation_code <> 'JP' then
220: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
213: fetch csr_bg into l_legislation_code;
214: if csr_bg%notfound then
215: close csr_bg;
216: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
217: hr_utility.raise_error;
218: else
219: if l_legislation_code <> 'JP' then
220: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
221: hr_utility.set_message_token('LEG_CODE','JP');
216: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
217: hr_utility.raise_error;
218: else
219: if l_legislation_code <> 'JP' then
220: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
221: hr_utility.set_message_token('LEG_CODE','JP');
222: hr_utility.raise_error;
223: end if;
224: end if;
217: hr_utility.raise_error;
218: else
219: if l_legislation_code <> 'JP' then
220: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
221: hr_utility.set_message_token('LEG_CODE','JP');
222: hr_utility.raise_error;
223: end if;
224: end if;
225: close csr_bg;
218: else
219: if l_legislation_code <> 'JP' then
220: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
221: hr_utility.set_message_token('LEG_CODE','JP');
222: hr_utility.raise_error;
223: end if;
224: end if;
225: close csr_bg;
226:
241: );
242: --
243: end if;
244:
245: hr_utility.set_location(l_proc, 40);
246: --
247: -- Call create_sit
248: hr_sit_api.create_sit
249: (p_validate => p_validate
309: ,p_person_analysis_id => p_person_analysis_id
310: ,p_pea_object_version_number => p_pea_object_version_number
311: );
312: --
313: hr_utility.set_location('Leaving:'|| l_proc, 50);
314: end create_jp_educ_sit;
315: -- ----------------------------------------------------------------------------
316: -- |---------------------< create_jp_employee_with_sit >----------------------|
317: -- ----------------------------------------------------------------------------
496: where pbg.business_group_id = p_business_group_id;
497: --
498:
499: begin
500: hr_utility.set_location('Entering:'|| l_proc, 5);
501: --
502: -- Issue a savepoint
503: --
504: savepoint create_jp_employee_with_sit;
502: -- Issue a savepoint
503: --
504: savepoint create_jp_employee_with_sit;
505:
506: hr_utility.set_location(l_proc, 10);
507: --
508: -- Validation in addition to Row Handlers
509: --
510: -- Check that the specified business group is valid.
508: -- Validation in addition to Row Handlers
509: --
510: -- Check that the specified business group is valid.
511: --
512: hr_utility.set_location(l_proc, 20);
513: open csr_bg;
514: fetch csr_bg into l_legislation_code;
515: if csr_bg%notfound then
516: close csr_bg;
513: open csr_bg;
514: fetch csr_bg into l_legislation_code;
515: if csr_bg%notfound then
516: close csr_bg;
517: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
518: hr_utility.raise_error;
519: else
520: if l_legislation_code <> 'JP' then
521: close csr_bg;
514: fetch csr_bg into l_legislation_code;
515: if csr_bg%notfound then
516: close csr_bg;
517: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
518: hr_utility.raise_error;
519: else
520: if l_legislation_code <> 'JP' then
521: close csr_bg;
522: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
518: hr_utility.raise_error;
519: else
520: if l_legislation_code <> 'JP' then
521: close csr_bg;
522: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
523: hr_utility.set_message_token('LEG_CODE','JP');
524: hr_utility.raise_error;
525: end if;
526: end if;
519: else
520: if l_legislation_code <> 'JP' then
521: close csr_bg;
522: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
523: hr_utility.set_message_token('LEG_CODE','JP');
524: hr_utility.raise_error;
525: end if;
526: end if;
527: close csr_bg;
520: if l_legislation_code <> 'JP' then
521: close csr_bg;
522: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
523: hr_utility.set_message_token('LEG_CODE','JP');
524: hr_utility.raise_error;
525: end if;
526: end if;
527: close csr_bg;
528:
527: close csr_bg;
528:
529: l_employee_number := p_employee_number;
530: --
531: hr_utility.set_location(l_proc, 30);
532: --
533: -- Process Logic
534: --
535: -- Call the person business process
654: ,p_per_information29 => p_per_information29
655: ,p_per_information30 => p_per_information30
656: );
657: --
658: hr_utility.set_location(' Leaving:'||l_proc, 40);
659: --
660: -- Create SIT if not all params are set to null.
661: --
662: if not (p_id_flex_num is null
715: and p_segment29 is null
716: and p_segment30 is null
717: ) then
718: --
719: hr_utility.set_location(l_proc, 50);
720: --
721: hr_sit_api.create_sit
722: (p_validate => false
723: ,p_person_id => l_person_id
793: -- Set all output arguments
794: --
795: p_person_id := l_person_id;
796: --
797: hr_utility.set_location(' Leaving:'||l_proc, 60);
798: exception
799: when hr_api.validate_enabled then
800: --
801: -- As the Validate_Enabled exception has been raised
848: p_pea_object_version_number := null;
849: p_analysis_criteria_id := null;
850: p_person_analysis_id := null;
851:
852: hr_utility.set_location(' Leaving:'||l_proc, 70);
853: raise;
854: end create_jp_employee_with_sit;
855: --
856: -- ----------------------------------------------------------------------------
1061: --
1062:
1063: begin
1064: --
1065: hr_utility.set_location('Entering:'|| l_proc, 5);
1066: --
1067: -- Issue a savepoint
1068: --
1069: savepoint create_jp_emp_with_educ_add;
1069: savepoint create_jp_emp_with_educ_add;
1070: --
1071: -- Check that the specified business group is valid.
1072: --
1073: hr_utility.set_location(l_proc, 10);
1074: open csr_bg;
1075: fetch csr_bg into l_legislation_code;
1076: if csr_bg%notfound then
1077: close csr_bg;
1074: open csr_bg;
1075: fetch csr_bg into l_legislation_code;
1076: if csr_bg%notfound then
1077: close csr_bg;
1078: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
1079: hr_utility.raise_error;
1080: else
1081: if l_legislation_code <> 'JP' then
1082: close csr_bg;
1075: fetch csr_bg into l_legislation_code;
1076: if csr_bg%notfound then
1077: close csr_bg;
1078: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
1079: hr_utility.raise_error;
1080: else
1081: if l_legislation_code <> 'JP' then
1082: close csr_bg;
1083: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
1079: hr_utility.raise_error;
1080: else
1081: if l_legislation_code <> 'JP' then
1082: close csr_bg;
1083: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
1084: hr_utility.set_message_token('LEG_CODE','JP');
1085: hr_utility.raise_error;
1086: end if;
1087: end if;
1080: else
1081: if l_legislation_code <> 'JP' then
1082: close csr_bg;
1083: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
1084: hr_utility.set_message_token('LEG_CODE','JP');
1085: hr_utility.raise_error;
1086: end if;
1087: end if;
1088: close csr_bg;
1081: if l_legislation_code <> 'JP' then
1082: close csr_bg;
1083: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
1084: hr_utility.set_message_token('LEG_CODE','JP');
1085: hr_utility.raise_error;
1086: end if;
1087: end if;
1088: close csr_bg;
1089:
1088: close csr_bg;
1089:
1090: l_employee_number := p_employee_number;
1091: --
1092: hr_utility.set_location(l_proc, 20);
1093: --
1094: hr_employee_api.create_employee
1095: ( p_validate => false
1096: ,p_hire_date => p_hire_date
1211: ,p_per_information29 => p_per_information29
1212: ,p_per_information30 => p_per_information30
1213: );
1214: --
1215: hr_utility.set_location(l_proc, 30);
1216: --
1217: -- Create Educ Bkgrd if not all of the params are set to null.
1218: --
1219: if not (p_pea_comments is null
1251: and p_note is null
1252: and p_last_flag is null
1253: ) then
1254: --
1255: hr_utility.set_location(l_proc, 40);
1256: --
1257: hr_jpbp_api.create_jp_educ_sit
1258: (p_validate => false
1259: ,p_person_id => l_person_id
1319: );
1320: --
1321: end if;
1322: --
1323: hr_utility.set_location(l_proc, 50);
1324: --
1325: -- call create_person_address if not all parameters are null.
1326: --
1327: if not
1363: and p_addr_attribute19 is null
1364: and p_addr_attribute20 is null) then
1365:
1366: --
1367: hr_utility.set_location(l_proc, 60);
1368: --
1369:
1370: hr_person_address_api.create_person_address
1371: ( p_validate => false
1415: );
1416: end if;
1417: --
1418: --
1419: hr_utility.set_location(l_proc, 70);
1420: --
1421: --
1422: if p_validate then
1423: raise hr_api.validate_enabled;
1426: -- Set all output arguments
1427: --
1428: p_person_id := l_person_id;
1429: --
1430: hr_utility.set_location(' Leaving:'||l_proc, 80);
1431: exception
1432: when hr_api.validate_enabled then
1433: --
1434: -- As the Validate_Enabled exception has been raised
1457:
1458: p_address_id := null;
1459: p_add_object_version_number := null;
1460:
1461: hr_utility.set_location(' Leaving:'||l_proc, 90);
1462:
1463: when others then
1464: --
1465: -- A validation or unexpected error has occurred
1487: p_pea_object_version_number := null;
1488: p_analysis_criteria_id := null;
1489: p_person_analysis_id := null;
1490:
1491: hr_utility.set_location(' Leaving:'||l_proc, 100);
1492: raise;
1493: end create_jp_emp_with_educ_add;
1494:
1495:
1665: -- Issue a savepoint
1666: --
1667: savepoint create_jp_applicant_with_sit;
1668:
1669: hr_utility.set_location('Entering:'|| l_proc, 5);
1670: --
1671: -- Validation in addition to Table Handlers
1672: --
1673: -- Check that the specified business group is valid.
1676: fetch csr_bg
1677: into l_legislation_code;
1678: if csr_bg%notfound then
1679: close csr_bg;
1680: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
1681: hr_utility.raise_error;
1682: end if;
1683: close csr_bg;
1684: --
1677: into l_legislation_code;
1678: if csr_bg%notfound then
1679: close csr_bg;
1680: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
1681: hr_utility.raise_error;
1682: end if;
1683: close csr_bg;
1684: --
1685: -- Check that the legislation of the specified business group is 'JP'.
1684: --
1685: -- Check that the legislation of the specified business group is 'JP'.
1686: --
1687: if l_legislation_code <> 'JP' then
1688: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
1689: hr_utility.set_message_token('LEG_CODE','JP');
1690: hr_utility.raise_error;
1691: end if;
1692:
1685: -- Check that the legislation of the specified business group is 'JP'.
1686: --
1687: if l_legislation_code <> 'JP' then
1688: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
1689: hr_utility.set_message_token('LEG_CODE','JP');
1690: hr_utility.raise_error;
1691: end if;
1692:
1693: l_applicant_number := p_applicant_number;
1686: --
1687: if l_legislation_code <> 'JP' then
1688: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
1689: hr_utility.set_message_token('LEG_CODE','JP');
1690: hr_utility.raise_error;
1691: end if;
1692:
1693: l_applicant_number := p_applicant_number;
1694: --
1691: end if;
1692:
1693: l_applicant_number := p_applicant_number;
1694: --
1695: hr_utility.set_location(l_proc, 10);
1696: --
1697: -- Call the person business process
1698: --
1699: hr_applicant_api.create_applicant
1798: ,p_name_combination_warning => p_name_combination_warning
1799: ,p_orig_hire_warning => p_orig_hire_warning
1800: );
1801: --
1802: hr_utility.set_location(l_proc, 20);
1803: --
1804: -- Create SIT if not all params are set to null.
1805: --
1806: if not (p_id_flex_num is null
1859: and p_segment29 is null
1860: and p_segment30 is null
1861: ) then
1862: --
1863: hr_utility.set_location(l_proc, 30);
1864: --
1865: hr_sit_api.create_sit
1866: (p_validate => false
1867: ,p_person_id => l_person_id
1937: -- Set all output arguments
1938: --
1939: p_person_id := l_person_id;
1940: --
1941: hr_utility.set_location(' Leaving:'||l_proc, 40);
1942: exception
1943: when hr_api.validate_enabled then
1944: --
1945: -- As the Validate_Enabled exception has been raised
1995: p_pea_object_version_number := null;
1996: p_analysis_criteria_id := null;
1997: p_person_analysis_id := null;
1998:
1999: hr_utility.set_location(' Leaving:'||l_proc, 50);
2000: raise;
2001: end create_jp_applicant_with_sit;
2002: --
2003: -- ----------------------------------------------------------------------------
2189: --
2190:
2191: begin
2192: --
2193: hr_utility.set_location('Entering:'|| l_proc, 5);
2194: --
2195: -- Issue a savepoint
2196: --
2197: savepoint create_jp_appl_with_educ_add;
2198:
2199: --
2200: -- Check that the specified business group is valid.
2201: --
2202: hr_utility.set_location(l_proc, 10);
2203: --
2204: open csr_bg;
2205: fetch csr_bg into l_legislation_code;
2206: if csr_bg%notfound then
2204: open csr_bg;
2205: fetch csr_bg into l_legislation_code;
2206: if csr_bg%notfound then
2207: close csr_bg;
2208: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
2209: hr_utility.raise_error;
2210: else
2211: if l_legislation_code <> 'JP' then
2212: close csr_bg;
2205: fetch csr_bg into l_legislation_code;
2206: if csr_bg%notfound then
2207: close csr_bg;
2208: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
2209: hr_utility.raise_error;
2210: else
2211: if l_legislation_code <> 'JP' then
2212: close csr_bg;
2213: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
2209: hr_utility.raise_error;
2210: else
2211: if l_legislation_code <> 'JP' then
2212: close csr_bg;
2213: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
2214: hr_utility.set_message_token('LEG_CODE','JP');
2215: hr_utility.raise_error;
2216: end if;
2217: end if;
2210: else
2211: if l_legislation_code <> 'JP' then
2212: close csr_bg;
2213: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
2214: hr_utility.set_message_token('LEG_CODE','JP');
2215: hr_utility.raise_error;
2216: end if;
2217: end if;
2218: close csr_bg;
2211: if l_legislation_code <> 'JP' then
2212: close csr_bg;
2213: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
2214: hr_utility.set_message_token('LEG_CODE','JP');
2215: hr_utility.raise_error;
2216: end if;
2217: end if;
2218: close csr_bg;
2219:
2220: l_applicant_number := p_applicant_number;
2221: --
2222: -- call create_person_address
2223: --
2224: hr_utility.set_location(l_proc, 20);
2225: --
2226: hr_applicant_api.create_applicant
2227: ( p_validate => false
2228: ,p_date_received => p_date_received
2325: ,p_name_combination_warning => p_name_combination_warning
2326: ,p_orig_hire_warning => p_orig_hire_warning
2327: );
2328: --
2329: hr_utility.set_location(l_proc, 30);
2330: --
2331: -- Create Educ Bkgrd if not all of the params are set to null.
2332: --
2333: if not (p_pea_comments is null
2365: and p_note is null
2366: and p_last_flag is null
2367: ) then
2368: --
2369: hr_utility.set_location(l_proc, 40);
2370: --
2371: hr_jpbp_api.create_jp_educ_sit
2372: (p_validate => false
2373: ,p_person_id => l_person_id
2433: );
2434: --
2435: end if;
2436: --
2437: hr_utility.set_location(l_proc, 50);
2438: --
2439: -- call create_person_address if not all parameters are null.
2440: --
2441: if not
2476: and p_addr_attribute18 is null
2477: and p_addr_attribute19 is null
2478: and p_addr_attribute20 is null) then
2479: --
2480: hr_utility.set_location(l_proc, 60);
2481: --
2482: hr_person_address_api.create_person_address
2483: ( p_validate => false
2484: ,p_effective_date => p_date_received
2527: );
2528: end if;
2529: --
2530: --
2531: hr_utility.set_location(l_proc, 70);
2532: --
2533: --
2534: if p_validate then
2535: raise hr_api.validate_enabled;
2538: -- Set all output arguments
2539: --
2540: p_person_id := l_person_id;
2541: --
2542: hr_utility.set_location(' Leaving:'||l_proc, 80);
2543: --
2544: exception
2545: when hr_api.validate_enabled then
2546: --
2571:
2572: p_address_id := null;
2573: p_add_object_version_number := null;
2574:
2575: hr_utility.set_location(' Leaving:'||l_proc, 90);
2576:
2577: when others then
2578: --
2579: -- A validation or unexpected error has occurred
2604:
2605: p_address_id := null;
2606: p_add_object_version_number := null;
2607:
2608: hr_utility.set_location(' Leaving:'||l_proc, 100);
2609: raise;
2610: end create_jp_appl_with_educ_add;
2611: --
2612: end HR_JPBP_API;