43: l_positions_seg boolean default FALSE;
44: l_grade_seg boolean default FALSE;
45:
46: BEGIN
47: hr_utility.set_location('Entering:'|| l_proc, 10);
48:
49: if p_seg_type = 'JOB' then
50: hr_utility.set_location(l_proc, 20);
51: open csr_job_seg_defined(p_configuration_code);
46: BEGIN
47: hr_utility.set_location('Entering:'|| l_proc, 10);
48:
49: if p_seg_type = 'JOB' then
50: hr_utility.set_location(l_proc, 20);
51: open csr_job_seg_defined(p_configuration_code);
52:
53: fetch csr_job_seg_defined into l_jobs_seg_count;
54:
53: fetch csr_job_seg_defined into l_jobs_seg_count;
54:
55: if l_jobs_seg_count > 0 then
56: l_jobs_seg := TRUE;
57: hr_utility.trace('Jobs Defined');
58: hr_utility.set_location(l_proc, 30);
59: end if;
60: close csr_job_seg_defined;
61: hr_utility.set_location(' Leaving:'|| l_proc, 110);
54:
55: if l_jobs_seg_count > 0 then
56: l_jobs_seg := TRUE;
57: hr_utility.trace('Jobs Defined');
58: hr_utility.set_location(l_proc, 30);
59: end if;
60: close csr_job_seg_defined;
61: hr_utility.set_location(' Leaving:'|| l_proc, 110);
62: return l_jobs_seg;
57: hr_utility.trace('Jobs Defined');
58: hr_utility.set_location(l_proc, 30);
59: end if;
60: close csr_job_seg_defined;
61: hr_utility.set_location(' Leaving:'|| l_proc, 110);
62: return l_jobs_seg;
63: end if;
64:
65: if p_seg_type = 'POSITION' then
62: return l_jobs_seg;
63: end if;
64:
65: if p_seg_type = 'POSITION' then
66: hr_utility.set_location(l_proc, 40);
67: open csr_pos_seg_defined(p_configuration_code);
68:
69: fetch csr_pos_seg_defined into l_positions_seg_count;
70:
69: fetch csr_pos_seg_defined into l_positions_seg_count;
70:
71: if l_positions_seg_count > 0 then
72: l_positions_seg := TRUE;
73: hr_utility.trace('Positions Defined');
74: hr_utility.set_location(l_proc, 50);
75: end if;
76: close csr_pos_seg_defined;
77: hr_utility.set_location(' Leaving:'|| l_proc, 120);
70:
71: if l_positions_seg_count > 0 then
72: l_positions_seg := TRUE;
73: hr_utility.trace('Positions Defined');
74: hr_utility.set_location(l_proc, 50);
75: end if;
76: close csr_pos_seg_defined;
77: hr_utility.set_location(' Leaving:'|| l_proc, 120);
78: return l_positions_seg;
73: hr_utility.trace('Positions Defined');
74: hr_utility.set_location(l_proc, 50);
75: end if;
76: close csr_pos_seg_defined;
77: hr_utility.set_location(' Leaving:'|| l_proc, 120);
78: return l_positions_seg;
79: end if;
80:
81: if p_seg_type = 'GRADE' then
78: return l_positions_seg;
79: end if;
80:
81: if p_seg_type = 'GRADE' then
82: hr_utility.set_location(l_proc, 80);
83: open csr_grd_seg_defined(p_configuration_code);
84:
85: fetch csr_grd_seg_defined into l_grade_seg_count;
86:
85: fetch csr_grd_seg_defined into l_grade_seg_count;
86:
87: if l_grade_seg_count > 0 then
88: l_grade_seg := TRUE;
89: hr_utility.set_location(l_proc, 90);
90: end if;
91: close csr_grd_seg_defined;
92: hr_utility.trace('Grades Defined');
93: hr_utility.set_location(' Leaving:'|| l_proc, 130);
88: l_grade_seg := TRUE;
89: hr_utility.set_location(l_proc, 90);
90: end if;
91: close csr_grd_seg_defined;
92: hr_utility.trace('Grades Defined');
93: hr_utility.set_location(' Leaving:'|| l_proc, 130);
94: return l_grade_seg;
95: end if;
96:
89: hr_utility.set_location(l_proc, 90);
90: end if;
91: close csr_grd_seg_defined;
92: hr_utility.trace('Grades Defined');
93: hr_utility.set_location(' Leaving:'|| l_proc, 130);
94: return l_grade_seg;
95: end if;
96:
97: EXCEPTION
96:
97: EXCEPTION
98: when others then
99: l_error_message := 'Error in ' || l_proc;
100: hr_utility.trace(l_error_message || '-' || sqlerrm);
101: hr_utility.set_location(' Leaving:'|| l_proc, 500);
102: hr_utility.raise_error;
103:
104: END jpg_defined;
97: EXCEPTION
98: when others then
99: l_error_message := 'Error in ' || l_proc;
100: hr_utility.trace(l_error_message || '-' || sqlerrm);
101: hr_utility.set_location(' Leaving:'|| l_proc, 500);
102: hr_utility.raise_error;
103:
104: END jpg_defined;
105:
98: when others then
99: l_error_message := 'Error in ' || l_proc;
100: hr_utility.trace(l_error_message || '-' || sqlerrm);
101: hr_utility.set_location(' Leaving:'|| l_proc, 500);
102: hr_utility.raise_error;
103:
104: END jpg_defined;
105:
106: /* --------------------------------------------------------------------------
134: l_jp_rv boolean default FALSE;
135: l_grd_rv boolean default FALSE;
136:
137: BEGIN
138: hr_utility.set_location('Entering:'|| l_proc, 10);
139:
140: if p_rv_type = 'JP' then
141: hr_utility.set_location(l_proc, 20);
142: open csr_jp_rv_defined(p_configuration_code);
137: BEGIN
138: hr_utility.set_location('Entering:'|| l_proc, 10);
139:
140: if p_rv_type = 'JP' then
141: hr_utility.set_location(l_proc, 20);
142: open csr_jp_rv_defined(p_configuration_code);
143:
144: fetch csr_jp_rv_defined into l_jp_rv_count;
145:
144: fetch csr_jp_rv_defined into l_jp_rv_count;
145:
146: if l_jp_rv_count > 0 then
147: l_jp_rv := TRUE;
148: hr_utility.set_location(l_proc, 30);
149: end if;
150: close csr_jp_rv_defined;
151:
152: if l_jp_rv then
149: end if;
150: close csr_jp_rv_defined;
151:
152: if l_jp_rv then
153: hr_utility.trace('JP Regional Variance Defined');
154: else
155: hr_utility.trace('JP Regional Variance NOT Defined');
156: end if;
157: return l_jp_rv;
151:
152: if l_jp_rv then
153: hr_utility.trace('JP Regional Variance Defined');
154: else
155: hr_utility.trace('JP Regional Variance NOT Defined');
156: end if;
157: return l_jp_rv;
158: end if;
159:
157: return l_jp_rv;
158: end if;
159:
160: if p_rv_type = 'GRD' then
161: hr_utility.set_location(l_proc, 80);
162: open csr_grd_rv_defined(p_configuration_code);
163:
164: fetch csr_grd_rv_defined into l_grd_rv_count;
165:
164: fetch csr_grd_rv_defined into l_grd_rv_count;
165:
166: if l_grd_rv_count > 0 then
167: l_grd_rv := TRUE;
168: hr_utility.set_location(l_proc, 90);
169: end if;
170: close csr_grd_rv_defined;
171:
172: if l_grd_rv then
169: end if;
170: close csr_grd_rv_defined;
171:
172: if l_grd_rv then
173: hr_utility.trace('Grades Regional Variance Defined');
174: else
175: hr_utility.trace('Grades Regional Variance NOT Defined');
176: end if;
177:
171:
172: if l_grd_rv then
173: hr_utility.trace('Grades Regional Variance Defined');
174: else
175: hr_utility.trace('Grades Regional Variance NOT Defined');
176: end if;
177:
178: return l_grd_rv;
179: end if;
176: end if;
177:
178: return l_grd_rv;
179: end if;
180: hr_utility.set_location(' Leaving:'|| l_proc, 30);
181:
182: EXCEPTION
183: when others then
184: l_error_message := 'Error in ' || l_proc;
181:
182: EXCEPTION
183: when others then
184: l_error_message := 'Error in ' || l_proc;
185: hr_utility.trace(l_error_message || '-' || sqlerrm);
186: hr_utility.set_location(' Leaving:'|| l_proc, 500);
187: hr_utility.raise_error;
188:
189: END;
182: EXCEPTION
183: when others then
184: l_error_message := 'Error in ' || l_proc;
185: hr_utility.trace(l_error_message || '-' || sqlerrm);
186: hr_utility.set_location(' Leaving:'|| l_proc, 500);
187: hr_utility.raise_error;
188:
189: END;
190:
183: when others then
184: l_error_message := 'Error in ' || l_proc;
185: hr_utility.trace(l_error_message || '-' || sqlerrm);
186: hr_utility.set_location(' Leaving:'|| l_proc, 500);
187: hr_utility.raise_error;
188:
189: END;
190:
191: /* --------------------------------------------------------------------------
218: l_regional_variance_name per_ri_config_information.config_information1%type;
219: l_job_key_flex_name varchar2(30);
220:
221: BEGIN
222: hr_utility.set_location('Entering:'|| l_proc, 10);
223:
224: open csr_job_rv(p_configuration_code
225: ,p_bg_country_code);
226: fetch csr_job_rv into l_regional_variance_name;
224: open csr_job_rv(p_configuration_code
225: ,p_bg_country_code);
226: fetch csr_job_rv into l_regional_variance_name;
227: if csr_job_rv%FOUND then
228: hr_utility.set_location(l_proc, 20);
229: l_job_key_flex_name := per_ri_config_utilities.return_config_entity_name(l_regional_variance_name)
230: || per_ri_config_main.g_job_rv_struct_def_string;
231: else
232: hr_utility.set_location(l_proc, 30);
228: hr_utility.set_location(l_proc, 20);
229: l_job_key_flex_name := per_ri_config_utilities.return_config_entity_name(l_regional_variance_name)
230: || per_ri_config_main.g_job_rv_struct_def_string;
231: else
232: hr_utility.set_location(l_proc, 30);
233: l_job_key_flex_name := per_ri_config_utilities.return_config_entity_name
234: (per_ri_config_main.g_global_job_structure_name);
235: end if;
236: hr_utility.set_location(' Leaving:' || l_proc, 20);
232: hr_utility.set_location(l_proc, 30);
233: l_job_key_flex_name := per_ri_config_utilities.return_config_entity_name
234: (per_ri_config_main.g_global_job_structure_name);
235: end if;
236: hr_utility.set_location(' Leaving:' || l_proc, 20);
237: return l_job_key_flex_name;
238:
239: EXCEPTION
240: when others then
238:
239: EXCEPTION
240: when others then
241: l_error_message := 'Error in ' || l_proc;
242: hr_utility.trace(l_error_message || '-' || sqlerrm);
243: hr_utility.set_location(' Leaving:'|| l_proc, 500);
244: hr_utility.raise_error;
245:
246: END get_bg_job_keyflex_name;
239: EXCEPTION
240: when others then
241: l_error_message := 'Error in ' || l_proc;
242: hr_utility.trace(l_error_message || '-' || sqlerrm);
243: hr_utility.set_location(' Leaving:'|| l_proc, 500);
244: hr_utility.raise_error;
245:
246: END get_bg_job_keyflex_name;
247:
240: when others then
241: l_error_message := 'Error in ' || l_proc;
242: hr_utility.trace(l_error_message || '-' || sqlerrm);
243: hr_utility.set_location(' Leaving:'|| l_proc, 500);
244: hr_utility.raise_error;
245:
246: END get_bg_job_keyflex_name;
247:
248: /* --------------------------------------------------------------------------
274: l_regional_variance_name per_ri_config_information.config_information1%type;
275: l_pos_key_flex_name varchar2(30);
276:
277: BEGIN
278: hr_utility.set_location('Entering:'|| l_proc, 10);
279:
280: open csr_pos_rv(p_configuration_code
281: ,p_bg_country_code);
282: fetch csr_pos_rv into l_regional_variance_name;
280: open csr_pos_rv(p_configuration_code
281: ,p_bg_country_code);
282: fetch csr_pos_rv into l_regional_variance_name;
283: if csr_pos_rv%FOUND then
284: hr_utility.set_location(l_proc, 20);
285: l_pos_key_flex_name := per_ri_config_utilities.return_config_entity_name(l_regional_variance_name)
286: || per_ri_config_main.g_pos_rv_struct_def_string;
287: else
288: hr_utility.set_location(l_proc, 30);
284: hr_utility.set_location(l_proc, 20);
285: l_pos_key_flex_name := per_ri_config_utilities.return_config_entity_name(l_regional_variance_name)
286: || per_ri_config_main.g_pos_rv_struct_def_string;
287: else
288: hr_utility.set_location(l_proc, 30);
289: l_pos_key_flex_name := per_ri_config_utilities.return_config_entity_name
290: (per_ri_config_main.g_global_pos_structure_name);
291: end if;
292: hr_utility.set_location(' Leaving:' || l_proc, 20);
288: hr_utility.set_location(l_proc, 30);
289: l_pos_key_flex_name := per_ri_config_utilities.return_config_entity_name
290: (per_ri_config_main.g_global_pos_structure_name);
291: end if;
292: hr_utility.set_location(' Leaving:' || l_proc, 20);
293: return l_pos_key_flex_name;
294:
295: EXCEPTION
296: when others then
294:
295: EXCEPTION
296: when others then
297: l_error_message := 'Error in ' || l_proc;
298: hr_utility.trace(l_error_message || '-' || sqlerrm);
299: hr_utility.set_location(' Leaving:'|| l_proc, 500);
300: hr_utility.raise_error;
301:
302: END get_bg_pos_keyflex_name;
295: EXCEPTION
296: when others then
297: l_error_message := 'Error in ' || l_proc;
298: hr_utility.trace(l_error_message || '-' || sqlerrm);
299: hr_utility.set_location(' Leaving:'|| l_proc, 500);
300: hr_utility.raise_error;
301:
302: END get_bg_pos_keyflex_name;
303:
296: when others then
297: l_error_message := 'Error in ' || l_proc;
298: hr_utility.trace(l_error_message || '-' || sqlerrm);
299: hr_utility.set_location(' Leaving:'|| l_proc, 500);
300: hr_utility.raise_error;
301:
302: END get_bg_pos_keyflex_name;
303:
304: /* --------------------------------------------------------------------------
327: l_product_name per_ri_config_information.config_information1%type;
328: l_product_selected boolean default FALSE;
329:
330: BEGIN
331: hr_utility.set_location('Entering:'|| l_proc, 10);
332:
333: open csr_get_product(p_configuration_code
334: ,p_product_name);
335: fetch csr_get_product into l_product_name;
333: open csr_get_product(p_configuration_code
334: ,p_product_name);
335: fetch csr_get_product into l_product_name;
336: if csr_get_product%FOUND then
337: hr_utility.set_location(l_proc, 20);
338: l_product_selected := TRUE;
339: else
340: l_product_selected := FALSE;
341: hr_utility.set_location(l_proc, 30);
337: hr_utility.set_location(l_proc, 20);
338: l_product_selected := TRUE;
339: else
340: l_product_selected := FALSE;
341: hr_utility.set_location(l_proc, 30);
342: end if;
343: hr_utility.set_location(' Leaving:' || l_proc, 20);
344: close csr_get_product;
345: return l_product_selected;
339: else
340: l_product_selected := FALSE;
341: hr_utility.set_location(l_proc, 30);
342: end if;
343: hr_utility.set_location(' Leaving:' || l_proc, 20);
344: close csr_get_product;
345: return l_product_selected;
346:
347: EXCEPTION
346:
347: EXCEPTION
348: when others then
349: l_error_message := 'Error in ' || l_proc;
350: hr_utility.trace(l_error_message || '-' || sqlerrm);
351: hr_utility.set_location(' Leaving:'|| l_proc, 500);
352: hr_utility.raise_error;
353:
354: END check_selected_product;
347: EXCEPTION
348: when others then
349: l_error_message := 'Error in ' || l_proc;
350: hr_utility.trace(l_error_message || '-' || sqlerrm);
351: hr_utility.set_location(' Leaving:'|| l_proc, 500);
352: hr_utility.raise_error;
353:
354: END check_selected_product;
355:
348: when others then
349: l_error_message := 'Error in ' || l_proc;
350: hr_utility.trace(l_error_message || '-' || sqlerrm);
351: hr_utility.set_location(' Leaving:'|| l_proc, 500);
352: hr_utility.raise_error;
353:
354: END check_selected_product;
355:
356: /* --------------------------------------------------------------------------
379: l_grd_key_flex_name varchar2(30);
380: l_enterprise_primary_industry per_ri_config_information.config_information1%type;
381:
382: BEGIN
383: hr_utility.set_location('Entering:'|| l_proc, 10);
384:
385: l_enterprise_primary_industry := per_ri_config_utilities.get_ent_primary_industry
386: (p_configuration_code => p_configuration_code);
387: hr_utility.trace('l_enterprise_primary_industry = ' || l_enterprise_primary_industry);
383: hr_utility.set_location('Entering:'|| l_proc, 10);
384:
385: l_enterprise_primary_industry := per_ri_config_utilities.get_ent_primary_industry
386: (p_configuration_code => p_configuration_code);
387: hr_utility.trace('l_enterprise_primary_industry = ' || l_enterprise_primary_industry);
388: if l_enterprise_primary_industry <> 'US_GOVERNMENT' then
389: open csr_grd_rv(p_configuration_code
390: ,p_bg_country_code);
391: fetch csr_grd_rv into l_regional_variance_name;
389: open csr_grd_rv(p_configuration_code
390: ,p_bg_country_code);
391: fetch csr_grd_rv into l_regional_variance_name;
392: if csr_grd_rv%FOUND then
393: hr_utility.set_location(l_proc, 20);
394: l_grd_key_flex_name := l_regional_variance_name || per_ri_config_main.g_grd_rv_struct_def_string;
395: else
396: hr_utility.set_location(l_proc, 30);
397: l_grd_key_flex_name := per_ri_config_utilities.return_config_entity_name
392: if csr_grd_rv%FOUND then
393: hr_utility.set_location(l_proc, 20);
394: l_grd_key_flex_name := l_regional_variance_name || per_ri_config_main.g_grd_rv_struct_def_string;
395: else
396: hr_utility.set_location(l_proc, 30);
397: l_grd_key_flex_name := per_ri_config_utilities.return_config_entity_name
398: (per_ri_config_main.g_global_grd_structure_name);
399: end if;
400: hr_utility.trace('Grade Key Flex Name : ' || l_grd_key_flex_name);
396: hr_utility.set_location(l_proc, 30);
397: l_grd_key_flex_name := per_ri_config_utilities.return_config_entity_name
398: (per_ri_config_main.g_global_grd_structure_name);
399: end if;
400: hr_utility.trace('Grade Key Flex Name : ' || l_grd_key_flex_name);
401: hr_utility.set_location(' Leaving:' || l_proc, 20);
402: else
403: hr_utility.set_location(l_proc, 40);
404: l_grd_key_flex_name := per_ri_config_main.g_global_fed_grd_struct_name;
397: l_grd_key_flex_name := per_ri_config_utilities.return_config_entity_name
398: (per_ri_config_main.g_global_grd_structure_name);
399: end if;
400: hr_utility.trace('Grade Key Flex Name : ' || l_grd_key_flex_name);
401: hr_utility.set_location(' Leaving:' || l_proc, 20);
402: else
403: hr_utility.set_location(l_proc, 40);
404: l_grd_key_flex_name := per_ri_config_main.g_global_fed_grd_struct_name;
405: end if;
399: end if;
400: hr_utility.trace('Grade Key Flex Name : ' || l_grd_key_flex_name);
401: hr_utility.set_location(' Leaving:' || l_proc, 20);
402: else
403: hr_utility.set_location(l_proc, 40);
404: l_grd_key_flex_name := per_ri_config_main.g_global_fed_grd_struct_name;
405: end if;
406:
407: hr_utility.trace('l_grd_key_flex_name = ' || l_grd_key_flex_name);
403: hr_utility.set_location(l_proc, 40);
404: l_grd_key_flex_name := per_ri_config_main.g_global_fed_grd_struct_name;
405: end if;
406:
407: hr_utility.trace('l_grd_key_flex_name = ' || l_grd_key_flex_name);
408:
409: hr_utility.set_location(' Leaving:'|| l_proc, 60);
410:
411: return l_grd_key_flex_name;
405: end if;
406:
407: hr_utility.trace('l_grd_key_flex_name = ' || l_grd_key_flex_name);
408:
409: hr_utility.set_location(' Leaving:'|| l_proc, 60);
410:
411: return l_grd_key_flex_name;
412:
413: EXCEPTION
412:
413: EXCEPTION
414: when others then
415: l_error_message := 'Error in ' || l_proc;
416: hr_utility.trace(l_error_message || '-' || sqlerrm);
417: hr_utility.set_location(' Leaving:'|| l_proc, 500);
418: hr_utility.raise_error;
419:
420: END get_bg_grd_keyflex_name;
413: EXCEPTION
414: when others then
415: l_error_message := 'Error in ' || l_proc;
416: hr_utility.trace(l_error_message || '-' || sqlerrm);
417: hr_utility.set_location(' Leaving:'|| l_proc, 500);
418: hr_utility.raise_error;
419:
420: END get_bg_grd_keyflex_name;
421:
414: when others then
415: l_error_message := 'Error in ' || l_proc;
416: hr_utility.trace(l_error_message || '-' || sqlerrm);
417: hr_utility.set_location(' Leaving:'|| l_proc, 500);
418: hr_utility.raise_error;
419:
420: END get_bg_grd_keyflex_name;
421:
422: /* --------------------------------------------------------------------------
440: l_proc varchar2(72) := g_package || 'get_enterprise_short_name';
441: l_error_message varchar2(360);
442:
443: BEGIN
444: hr_utility.set_location('Entering:'|| l_proc, 10);
445:
446: open csr_get_enterprise_short_name(p_configuration_code);
447:
448: fetch csr_get_enterprise_short_name into
447:
448: fetch csr_get_enterprise_short_name into
449: l_enterprise_short_name;
450: if csr_get_enterprise_short_name%NOTFOUND then
451: hr_utility.set_location('Entering:'|| l_proc, 20);
452: end if;
453:
454: close csr_get_enterprise_short_name;
455:
452: end if;
453:
454: close csr_get_enterprise_short_name;
455:
456: hr_utility.set_location(' Leaving:'|| l_proc, 30);
457:
458: -- Working on this issue
459: if g_enterprise_short_name is NULL then
460: g_enterprise_short_name := l_enterprise_short_name;
466:
467: EXCEPTION
468: when others then
469: l_error_message := 'Error in ' || l_proc;
470: hr_utility.trace(l_error_message || '-' || sqlerrm);
471: hr_utility.set_location(' Leaving:'|| l_proc, 500);
472: hr_utility.raise_error;
473:
474: END;
467: EXCEPTION
468: when others then
469: l_error_message := 'Error in ' || l_proc;
470: hr_utility.trace(l_error_message || '-' || sqlerrm);
471: hr_utility.set_location(' Leaving:'|| l_proc, 500);
472: hr_utility.raise_error;
473:
474: END;
475:
468: when others then
469: l_error_message := 'Error in ' || l_proc;
470: hr_utility.trace(l_error_message || '-' || sqlerrm);
471: hr_utility.set_location(' Leaving:'|| l_proc, 500);
472: hr_utility.raise_error;
473:
474: END;
475:
476: /* --------------------------------------------------------------------------
492: l_proc varchar2(72) := g_package || 'get_enterprise_name';
493: l_error_message varchar2(360);
494:
495: BEGIN
496: hr_utility.set_location('Entering:'|| l_proc, 10);
497:
498: open csr_get_enterprise_name(p_configuration_code);
499:
500: fetch csr_get_enterprise_name into
499:
500: fetch csr_get_enterprise_name into
501: l_enterprise_name;
502: if csr_get_enterprise_name%NOTFOUND then
503: hr_utility.set_location('Entering:'|| l_proc, 20);
504: end if;
505:
506: close csr_get_enterprise_name;
507:
504: end if;
505:
506: close csr_get_enterprise_name;
507:
508: hr_utility.trace('l_enterprise_name = ' || l_enterprise_name);
509: hr_utility.set_location(' Leaving:'|| l_proc, 30);
510:
511: return l_enterprise_name;
512:
505:
506: close csr_get_enterprise_name;
507:
508: hr_utility.trace('l_enterprise_name = ' || l_enterprise_name);
509: hr_utility.set_location(' Leaving:'|| l_proc, 30);
510:
511: return l_enterprise_name;
512:
513: EXCEPTION
512:
513: EXCEPTION
514: when others then
515: l_error_message := 'Error in ' || l_proc;
516: hr_utility.trace(l_error_message || '-' || sqlerrm);
517: hr_utility.set_location(' Leaving:'|| l_proc, 500);
518: hr_utility.raise_error;
519:
520: END;
513: EXCEPTION
514: when others then
515: l_error_message := 'Error in ' || l_proc;
516: hr_utility.trace(l_error_message || '-' || sqlerrm);
517: hr_utility.set_location(' Leaving:'|| l_proc, 500);
518: hr_utility.raise_error;
519:
520: END;
521:
514: when others then
515: l_error_message := 'Error in ' || l_proc;
516: hr_utility.trace(l_error_message || '-' || sqlerrm);
517: hr_utility.set_location(' Leaving:'|| l_proc, 500);
518: hr_utility.raise_error;
519:
520: END;
521:
522: /* --------------------------------------------------------------------------
539:
540: l_proc varchar2(72) := g_package || 'get_ent_primary_industry';
541: l_error_message varchar2(360);
542: BEGIN
543: hr_utility.set_location('Entering:'|| l_proc, 10);
544:
545: open csr_get_ent_industry(p_configuration_code);
546:
547: fetch csr_get_ent_industry into l_enterprise_primary_industry;
545: open csr_get_ent_industry(p_configuration_code);
546:
547: fetch csr_get_ent_industry into l_enterprise_primary_industry;
548: if csr_get_ent_industry%NOTFOUND then
549: hr_utility.set_location(l_proc, 20);
550: end if;
551:
552: close csr_get_ent_industry;
553:
550: end if;
551:
552: close csr_get_ent_industry;
553:
554: hr_utility.trace('l_enterprise_primary_industry = ' || l_enterprise_primary_industry);
555: hr_utility.set_location(' Leaving:'|| l_proc, 30);
556:
557: return l_enterprise_primary_industry;
558:
551:
552: close csr_get_ent_industry;
553:
554: hr_utility.trace('l_enterprise_primary_industry = ' || l_enterprise_primary_industry);
555: hr_utility.set_location(' Leaving:'|| l_proc, 30);
556:
557: return l_enterprise_primary_industry;
558:
559: EXCEPTION
558:
559: EXCEPTION
560: when others then
561: l_error_message := 'Error in ' || l_proc;
562: hr_utility.trace(l_error_message || '-' || sqlerrm);
563: hr_utility.set_location(' Leaving:'|| l_proc, 500);
564: hr_utility.raise_error;
565:
566: END get_ent_primary_industry;
559: EXCEPTION
560: when others then
561: l_error_message := 'Error in ' || l_proc;
562: hr_utility.trace(l_error_message || '-' || sqlerrm);
563: hr_utility.set_location(' Leaving:'|| l_proc, 500);
564: hr_utility.raise_error;
565:
566: END get_ent_primary_industry;
567:
560: when others then
561: l_error_message := 'Error in ' || l_proc;
562: hr_utility.trace(l_error_message || '-' || sqlerrm);
563: hr_utility.set_location(' Leaving:'|| l_proc, 500);
564: hr_utility.raise_error;
565:
566: END get_ent_primary_industry;
567:
568: /* --------------------------------------------------------------------------
606: l_error_message varchar2(360);
607:
608: BEGIN
609:
610: hr_utility.set_location('Entering: '|| l_proc, 10);
611:
612: if (p_number_of_employees is not null)
613: and (p_payroll_to_process_employees is not null)
614: and (p_hr_support_for_this_country is not null) then
659: end if;
660: end if;
661: end if;
662:
663: hr_utility.trace('l_country_code = ' || l_country_code);
664: hr_utility.trace('l_business_group_decision = ' || l_business_group_decision);
665: if NOT l_called_from_ui then
666: close csr_config_business_groups;
667: end if;
660: end if;
661: end if;
662:
663: hr_utility.trace('l_country_code = ' || l_country_code);
664: hr_utility.trace('l_business_group_decision = ' || l_business_group_decision);
665: if NOT l_called_from_ui then
666: close csr_config_business_groups;
667: end if;
668:
665: if NOT l_called_from_ui then
666: close csr_config_business_groups;
667: end if;
668:
669: hr_utility.set_location(' Leaving: '|| l_proc, 20);
670:
671: if NOT l_called_from_ui then
672: return l_business_group_decision;
673: else
679:
680: EXCEPTION
681: when others then
682: l_error_message := 'Error in ' || l_proc;
683: hr_utility.trace(l_error_message || '-' || sqlerrm);
684: hr_utility.set_location(' Leaving:'|| l_proc, 500);
685: hr_utility.raise_error;
686:
687: END business_group_decision;
680: EXCEPTION
681: when others then
682: l_error_message := 'Error in ' || l_proc;
683: hr_utility.trace(l_error_message || '-' || sqlerrm);
684: hr_utility.set_location(' Leaving:'|| l_proc, 500);
685: hr_utility.raise_error;
686:
687: END business_group_decision;
688:
681: when others then
682: l_error_message := 'Error in ' || l_proc;
683: hr_utility.trace(l_error_message || '-' || sqlerrm);
684: hr_utility.set_location(' Leaving:'|| l_proc, 500);
685: hr_utility.raise_error;
686:
687: END business_group_decision;
688:
689: /* --------------------------------------------------------------------------
711: l_error_message varchar2(360);
712:
713: BEGIN
714:
715: hr_utility.set_location('Entering:'|| l_proc, 10);
716:
717: open csr_legislation_support(p_legislation_code
718: ,p_application_short_name);
719: fetch csr_legislation_support into
724: l_legislation_support := FALSE;
725: end if;
726:
727: close csr_legislation_support;
728: hr_utility.trace('l_legislation_code = ' || l_legislation_code);
729: hr_utility.set_location(' Leaving:'|| l_proc, 30);
730:
731: return l_legislation_support;
732:
725: end if;
726:
727: close csr_legislation_support;
728: hr_utility.trace('l_legislation_code = ' || l_legislation_code);
729: hr_utility.set_location(' Leaving:'|| l_proc, 30);
730:
731: return l_legislation_support;
732:
733: EXCEPTION
732:
733: EXCEPTION
734: when others then
735: l_error_message := 'Error in ' || l_proc;
736: hr_utility.trace(l_error_message || '-' || sqlerrm);
737: hr_utility.set_location(' Leaving:'|| l_proc, 500);
738: hr_utility.raise_error;
739:
740: END legislation_support;
733: EXCEPTION
734: when others then
735: l_error_message := 'Error in ' || l_proc;
736: hr_utility.trace(l_error_message || '-' || sqlerrm);
737: hr_utility.set_location(' Leaving:'|| l_proc, 500);
738: hr_utility.raise_error;
739:
740: END legislation_support;
741:
734: when others then
735: l_error_message := 'Error in ' || l_proc;
736: hr_utility.trace(l_error_message || '-' || sqlerrm);
737: hr_utility.set_location(' Leaving:'|| l_proc, 500);
738: hr_utility.raise_error;
739:
740: END legislation_support;
741:
742: /* --------------------------------------------------------------------------
771: l_proc varchar2(72) := g_package || 'set_profile_option_value';
772: l_error_message varchar2(360);
773:
774: BEGIN
775: hr_utility.set_location('Entering:'|| l_proc, 10);
776: hr_utility.trace('p_level:'|| p_level);
777: if (p_level = '10001') then
778: levval_id := 0;
779: elsif (p_level = '10002') then
772: l_error_message varchar2(360);
773:
774: BEGIN
775: hr_utility.set_location('Entering:'|| l_proc, 10);
776: hr_utility.trace('p_level:'|| p_level);
777: if (p_level = '10001') then
778: levval_id := 0;
779: elsif (p_level = '10002') then
780: select application_id into levval_id
823: and APPLICATION_ID = app_id
824: and LEVEL_ID = 10003
825: and LEVEL_VALUE_APPLICATION_ID = lapp_id
826: and LEVEL_VALUE = levval_id;
827: hr_utility.trace('Found Record..' || lapp_id || ' ' || levval_id);
828: else
829: select 'Y' into found
830: from FND_PROFILE_OPTION_VALUES
831: where PROFILE_OPTION_ID = profo_id
848: and level_value = levval_id;
849: end if;
850: exception
851: when no_data_found then
852: hr_utility.trace('Creating Profile Option Value..');
853: insert into fnd_profile_option_values (
854: application_id,
855: profile_option_id,
856: level_id,
922: l_proc varchar2(80) := g_package || 'create_key_flexfield';
923: l_log_message varchar2(360);
924:
925: BEGIN
926: hr_utility.set_location('Entering:'|| l_proc, 10);
927:
928: fnd_flex_key_api.set_session_mode('customer_data');
929:
930: l_flexfield := fnd_flex_key_api.find_flexfield
930: l_flexfield := fnd_flex_key_api.find_flexfield
931: (appl_short_name => p_appl_short_name
932: ,flex_code => p_flex_code );
933:
934: hr_utility.set_location(l_proc, 20);
935:
936: BEGIN
937: l_structure := fnd_flex_key_api.find_structure
938: (flexfield => l_flexfield,
938: (flexfield => l_flexfield,
939: structure_code => p_structure_code );
940:
941: return l_structure.structure_number;
942: hr_utility.set_location('Entering:'|| l_proc, 30);
943: EXCEPTION
944: WHEN NO_DATA_FOUND THEN
945: hr_utility.set_location(l_proc, 40);
946: l_structure:=fnd_flex_key_api.new_structure
941: return l_structure.structure_number;
942: hr_utility.set_location('Entering:'|| l_proc, 30);
943: EXCEPTION
944: WHEN NO_DATA_FOUND THEN
945: hr_utility.set_location(l_proc, 40);
946: l_structure:=fnd_flex_key_api.new_structure
947: (flexfield => l_flexfield,
948: structure_code => p_structure_code,
949: structure_title => p_structure_title,
977:
978: RETURN l_structure.structure_number;
979: END;
980:
981: hr_utility.set_location(' Leaving:'|| l_proc, 100);
982:
983: END create_key_flexfield;
984:
985: /* --------------------------------------------------------------------------
1035: l_log_message varchar2(360);
1036:
1037: BEGIN
1038:
1039: hr_utility.set_location('Entering:'|| l_proc, 10);
1040:
1041: fnd_flex_key_api.set_session_mode('customer_data');
1042:
1043: l_flexfield := fnd_flex_key_api.find_flexfield
1043: l_flexfield := fnd_flex_key_api.find_flexfield
1044: (appl_short_name => p_appl_short_name
1045: ,flex_code => p_flex_code );
1046:
1047: hr_utility.set_location(l_proc, 20);
1048:
1049: l_structure := fnd_flex_key_api.find_structure
1050: (flexfield => l_flexfield
1051: ,structure_code => p_structure_code );
1049: l_structure := fnd_flex_key_api.find_structure
1050: (flexfield => l_flexfield
1051: ,structure_code => p_structure_code );
1052: BEGIN
1053: hr_utility.trace(p_segment_name);
1054: l_segment := fnd_flex_key_api.find_segment
1055: (flexfield => l_flexfield
1056: ,structure => l_structure
1057: ,segment_name => p_segment_name);
1054: l_segment := fnd_flex_key_api.find_segment
1055: (flexfield => l_flexfield
1056: ,structure => l_structure
1057: ,segment_name => p_segment_name);
1058: hr_utility.set_location('Entering:'|| l_proc, 30);
1059: EXCEPTION
1060: when no_data_found then
1061:
1062: if p_fed_seg_attribute = 'N' then
1067: l_valueset_seq := p_segment_number;
1068: l_valueset_name := p_structure_code || ' ' || p_segment_name
1069: || ' ' || l_valueset_seq;
1070:
1071: hr_utility.trace('l_valueset_name = ' || l_valueset_name);
1072: per_ri_config_utilities.create_valueset(p_valueset_name => l_valueset_name
1073: ,p_valueset_type => p_segment_type);
1074: end if;
1075: hr_utility.set_location('Entering:'|| l_proc, 40);
1071: hr_utility.trace('l_valueset_name = ' || l_valueset_name);
1072: per_ri_config_utilities.create_valueset(p_valueset_name => l_valueset_name
1073: ,p_valueset_type => p_segment_type);
1074: end if;
1075: hr_utility.set_location('Entering:'|| l_proc, 40);
1076: hr_utility.trace('p_segment_number = ' || to_char(p_segment_number));
1077:
1078: -- valueset name is always passed when p_fed_seg_attribute = 'Y'
1079: if p_fed_seg_attribute = 'Y' then
1072: per_ri_config_utilities.create_valueset(p_valueset_name => l_valueset_name
1073: ,p_valueset_type => p_segment_type);
1074: end if;
1075: hr_utility.set_location('Entering:'|| l_proc, 40);
1076: hr_utility.trace('p_segment_number = ' || to_char(p_segment_number));
1077:
1078: -- valueset name is always passed when p_fed_seg_attribute = 'Y'
1079: if p_fed_seg_attribute = 'Y' then
1080: l_valueset_name := p_value_set;
1100: ,concat_size => p_concat_size
1101: ,lov_prompt => p_lov_prompt
1102: ,window_prompt => p_window_prompt);
1103:
1104: hr_utility.set_location(l_proc, 100);
1105:
1106: hr_utility.trace(p_segment_name);
1107: BEGIN
1108: hr_utility.set_location(l_proc, 110);
1102: ,window_prompt => p_window_prompt);
1103:
1104: hr_utility.set_location(l_proc, 100);
1105:
1106: hr_utility.trace(p_segment_name);
1107: BEGIN
1108: hr_utility.set_location(l_proc, 110);
1109: fnd_flex_key_api.add_segment(flexfield => l_flexfield
1110: ,structure => l_structure
1104: hr_utility.set_location(l_proc, 100);
1105:
1106: hr_utility.trace(p_segment_name);
1107: BEGIN
1108: hr_utility.set_location(l_proc, 110);
1109: fnd_flex_key_api.add_segment(flexfield => l_flexfield
1110: ,structure => l_structure
1111: ,segment => l_segment);
1112: --
1113: --assign qualifiers for CMP and COST KF.
1114: --
1115:
1116: if p_flex_code = 'CMP' and p_appl_short_name = 'PER' then
1117: hr_utility.trace('Assigning Qualifiers 111');
1118: fnd_flex_key_api.assign_qualifier(flexfield => l_flexfield,
1119: structure => l_structure,
1120: segment => l_segment,
1121: flexfield_qualifier => 'Default Attribute',
1119: structure => l_structure,
1120: segment => l_segment,
1121: flexfield_qualifier => 'Default Attribute',
1122: enable_flag => 'Y');
1123: hr_utility.trace('Assigned Qualifier CMP : Default Attribute');
1124:
1125: fnd_flex_key_api.assign_qualifier(flexfield => l_flexfield,
1126: structure => l_structure,
1127: segment => l_segment,
1134: structure => l_structure,
1135: segment => l_segment,
1136: flexfield_qualifier => 'ASSIGNMENT',
1137: enable_flag => 'Y');
1138: hr_utility.trace('assigned qualifier COST : ASSIGNMENT');
1139:
1140: fnd_flex_key_api.assign_qualifier(flexfield => l_flexfield,
1141: structure => l_structure,
1142: segment => l_segment,
1141: structure => l_structure,
1142: segment => l_segment,
1143: flexfield_qualifier => 'BALANCING',
1144: enable_flag => 'Y');
1145: hr_utility.trace('assigned qualifier COST : BALANCING');
1146:
1147: fnd_flex_key_api.assign_qualifier(flexfield => l_flexfield,
1148: structure => l_structure,
1149: segment => l_segment,
1148: structure => l_structure,
1149: segment => l_segment,
1150: flexfield_qualifier => 'ELEMENT',
1151: enable_flag => 'Y');
1152: hr_utility.trace('assigned qualifier COST : ELEMENT');
1153:
1154: fnd_flex_key_api.assign_qualifier(flexfield => l_flexfield,
1155: structure => l_structure,
1156: segment => l_segment,
1155: structure => l_structure,
1156: segment => l_segment,
1157: flexfield_qualifier => 'ELEMENT ENTRY',
1158: enable_flag => 'Y');
1159: hr_utility.trace('assigned qualifier COST : ELEMENT ENTRY');
1160:
1161: fnd_flex_key_api.assign_qualifier(flexfield => l_flexfield,
1162: structure => l_structure,
1163: segment => l_segment,
1162: structure => l_structure,
1163: segment => l_segment,
1164: flexfield_qualifier => 'ORGANIZATION',
1165: enable_flag => 'Y');
1166: hr_utility.trace('assigned qualifier COST : ORGANIZATION');
1167:
1168: fnd_flex_key_api.assign_qualifier(flexfield => l_flexfield,
1169: structure => l_structure,
1170: segment => l_segment,
1169: structure => l_structure,
1170: segment => l_segment,
1171: flexfield_qualifier => 'PAYROLL',
1172: enable_flag => 'Y');
1173: hr_utility.trace('assigned qualifier COST : PAYROLL');
1174: end if;
1175:
1176: EXCEPTION
1177: when others then
1174: end if;
1175:
1176: EXCEPTION
1177: when others then
1178: hr_utility.trace(substr(fnd_flex_key_api.message,1,256));
1179: END;
1180:
1181: END;
1182:
1196: l_proc varchar2(72) := g_package || 'write_log';
1197:
1198: BEGIN
1199:
1200: hr_utility.trace(p_message);
1201: if p_write_to_log_flag then
1202: fnd_file.put_line(fnd_file.log, p_message);
1203: end if;
1204: END write_log;
1228: l_proc varchar2(72) := g_package || 'get_le_bg_name';
1229: l_error_message varchar2(360);
1230:
1231: BEGIN
1232: hr_utility.set_location('Entering:'|| l_proc, 10);
1233:
1234: open csr_le_bg_name(p_configuration_code
1235: ,p_legal_entity_name);
1236: loop
1239: l_le_business_group_name := per_ri_config_utilities.business_group_decision
1240: (p_configuration_code
1241: ,l_legal_entity_country_name);
1242:
1243: hr_utility.trace('l_legal_entity_country_name = ' || l_legal_entity_country_name);
1244: hr_utility.trace('l_le_business_group_name = ' || l_le_business_group_name);
1245: end loop;
1246: close csr_le_bg_name;
1247: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1240: (p_configuration_code
1241: ,l_legal_entity_country_name);
1242:
1243: hr_utility.trace('l_legal_entity_country_name = ' || l_legal_entity_country_name);
1244: hr_utility.trace('l_le_business_group_name = ' || l_le_business_group_name);
1245: end loop;
1246: close csr_le_bg_name;
1247: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1248: return l_le_business_group_name;
1243: hr_utility.trace('l_legal_entity_country_name = ' || l_legal_entity_country_name);
1244: hr_utility.trace('l_le_business_group_name = ' || l_le_business_group_name);
1245: end loop;
1246: close csr_le_bg_name;
1247: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1248: return l_le_business_group_name;
1249:
1250: EXCEPTION
1251: when others then
1249:
1250: EXCEPTION
1251: when others then
1252: l_error_message := 'Error in ' || l_proc;
1253: hr_utility.trace(l_error_message || '-' || sqlerrm);
1254: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1255: hr_utility.raise_error;
1256:
1257: END get_le_bg_name;
1250: EXCEPTION
1251: when others then
1252: l_error_message := 'Error in ' || l_proc;
1253: hr_utility.trace(l_error_message || '-' || sqlerrm);
1254: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1255: hr_utility.raise_error;
1256:
1257: END get_le_bg_name;
1258:
1251: when others then
1252: l_error_message := 'Error in ' || l_proc;
1253: hr_utility.trace(l_error_message || '-' || sqlerrm);
1254: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1255: hr_utility.raise_error;
1256:
1257: END get_le_bg_name;
1258:
1259:
1281: l_proc varchar2(72) := g_package || 'get_oc_bg_name';
1282: l_error_message varchar2(360);
1283: BEGIN
1284:
1285: hr_utility.set_location('Entering:'|| l_proc, 10);
1286:
1287: open csr_oct_bg_name(p_configuration_code
1288: ,p_operating_company_name);
1289: -- if country selected is not there put that in international, if int is not created then put it for hq bg
1293: l_oc_business_group_name := per_ri_config_utilities.business_group_decision
1294: (p_configuration_code
1295: ,l_operating_company_hq_country);
1296:
1297: hr_utility.trace('l_operating_company_hq_country = ' || l_operating_company_hq_country);
1298: hr_utility.trace('l_oc_business_group_name = ' || l_oc_business_group_name);
1299: end loop;
1300: close csr_oct_bg_name;
1301: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1294: (p_configuration_code
1295: ,l_operating_company_hq_country);
1296:
1297: hr_utility.trace('l_operating_company_hq_country = ' || l_operating_company_hq_country);
1298: hr_utility.trace('l_oc_business_group_name = ' || l_oc_business_group_name);
1299: end loop;
1300: close csr_oct_bg_name;
1301: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1302: return l_oc_business_group_name;
1297: hr_utility.trace('l_operating_company_hq_country = ' || l_operating_company_hq_country);
1298: hr_utility.trace('l_oc_business_group_name = ' || l_oc_business_group_name);
1299: end loop;
1300: close csr_oct_bg_name;
1301: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1302: return l_oc_business_group_name;
1303:
1304: EXCEPTION
1305: when others then
1303:
1304: EXCEPTION
1305: when others then
1306: l_error_message := 'Error in ' || l_proc;
1307: hr_utility.trace(l_error_message || '-' || sqlerrm);
1308: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1309: hr_utility.raise_error;
1310:
1311: END get_oc_bg_name;
1304: EXCEPTION
1305: when others then
1306: l_error_message := 'Error in ' || l_proc;
1307: hr_utility.trace(l_error_message || '-' || sqlerrm);
1308: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1309: hr_utility.raise_error;
1310:
1311: END get_oc_bg_name;
1312:
1305: when others then
1306: l_error_message := 'Error in ' || l_proc;
1307: hr_utility.trace(l_error_message || '-' || sqlerrm);
1308: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1309: hr_utility.raise_error;
1310:
1311: END get_oc_bg_name;
1312:
1313: /* --------------------------------------------------------------------------
1334: l_error_message varchar2(360);
1335:
1336: BEGIN
1337:
1338: hr_utility.set_location('Entering:'|| l_proc, 10);
1339:
1340: open csr_ent_bg_name(p_configuration_code
1341: ,p_enterprise_name);
1342: loop
1346: l_business_group_name := per_ri_config_utilities.business_group_decision
1347: (p_configuration_code
1348: ,l_enterprise_hq_country);
1349:
1350: hr_utility.trace('l_enterprise_hq_country = ' || l_enterprise_hq_country);
1351: hr_utility.trace('l_business_group_name = ' || l_business_group_name);
1352: hr_utility.set_location(' Leaving:'|| l_proc, 30);
1353: return l_business_group_name;
1354: end loop;
1347: (p_configuration_code
1348: ,l_enterprise_hq_country);
1349:
1350: hr_utility.trace('l_enterprise_hq_country = ' || l_enterprise_hq_country);
1351: hr_utility.trace('l_business_group_name = ' || l_business_group_name);
1352: hr_utility.set_location(' Leaving:'|| l_proc, 30);
1353: return l_business_group_name;
1354: end loop;
1355: close csr_ent_bg_name;
1348: ,l_enterprise_hq_country);
1349:
1350: hr_utility.trace('l_enterprise_hq_country = ' || l_enterprise_hq_country);
1351: hr_utility.trace('l_business_group_name = ' || l_business_group_name);
1352: hr_utility.set_location(' Leaving:'|| l_proc, 30);
1353: return l_business_group_name;
1354: end loop;
1355: close csr_ent_bg_name;
1356:
1356:
1357: EXCEPTION
1358: when others then
1359: l_error_message := 'Error in ' || l_proc;
1360: hr_utility.trace(l_error_message || '-' || sqlerrm);
1361: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1362: hr_utility.raise_error;
1363:
1364: END get_enterprise_bg_name;
1357: EXCEPTION
1358: when others then
1359: l_error_message := 'Error in ' || l_proc;
1360: hr_utility.trace(l_error_message || '-' || sqlerrm);
1361: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1362: hr_utility.raise_error;
1363:
1364: END get_enterprise_bg_name;
1365:
1358: when others then
1359: l_error_message := 'Error in ' || l_proc;
1360: hr_utility.trace(l_error_message || '-' || sqlerrm);
1361: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1362: hr_utility.raise_error;
1363:
1364: END get_enterprise_bg_name;
1365:
1366: /* --------------------------------------------------------------------------
1387: l_error_message varchar2(360);
1388:
1389: BEGIN
1390:
1391: hr_utility.set_location('Entering:'|| l_proc, 10);
1392:
1393: open csr_location(p_configuration_code
1394: ,p_location_id);
1395: loop
1394: ,p_location_id);
1395: loop
1396: fetch csr_location into l_location_code;
1397: exit when csr_location%NOTFOUND;
1398: hr_utility.set_location(' Leaving:'|| l_proc, 30);
1399: return per_ri_config_utilities.return_config_entity_name(l_location_code);
1400: end loop;
1401: close csr_location;
1402:
1402:
1403: EXCEPTION
1404: when others then
1405: l_error_message := 'Error in ' || l_proc;
1406: hr_utility.trace(l_error_message || '-' || sqlerrm);
1407: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1408: hr_utility.raise_error;
1409:
1410: END get_config_location_code;
1403: EXCEPTION
1404: when others then
1405: l_error_message := 'Error in ' || l_proc;
1406: hr_utility.trace(l_error_message || '-' || sqlerrm);
1407: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1408: hr_utility.raise_error;
1409:
1410: END get_config_location_code;
1411:
1404: when others then
1405: l_error_message := 'Error in ' || l_proc;
1406: hr_utility.trace(l_error_message || '-' || sqlerrm);
1407: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1408: hr_utility.raise_error;
1409:
1410: END get_config_location_code;
1411:
1412: /* --------------------------------------------------------------------------
1437: l_found varchar2(1);
1438:
1439: BEGIN
1440:
1441: hr_utility.set_location('Entering:'|| l_proc, 10);
1442:
1443: open csr_mandatory_org_info_types(p_legislation_code
1444: ,p_org_classification);
1445: fetch csr_mandatory_org_info_types into l_found;
1443: open csr_mandatory_org_info_types(p_legislation_code
1444: ,p_org_classification);
1445: fetch csr_mandatory_org_info_types into l_found;
1446: if csr_mandatory_org_info_types%FOUND then
1447: hr_utility.trace('Mandatory Org Info Types ARE defined for ' || p_legislation_code);
1448: l_defined := TRUE;
1449: else
1450: hr_utility.trace('Mandatory Org Info Types NOT defined for ' || p_legislation_code);
1451: l_defined := FALSE;
1446: if csr_mandatory_org_info_types%FOUND then
1447: hr_utility.trace('Mandatory Org Info Types ARE defined for ' || p_legislation_code);
1448: l_defined := TRUE;
1449: else
1450: hr_utility.trace('Mandatory Org Info Types NOT defined for ' || p_legislation_code);
1451: l_defined := FALSE;
1452: end if;
1453: close csr_mandatory_org_info_types;
1454:
1451: l_defined := FALSE;
1452: end if;
1453: close csr_mandatory_org_info_types;
1454:
1455: hr_utility.trace('p_legislation_code = ' || p_legislation_code);
1456: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1457:
1458: return l_defined;
1459:
1452: end if;
1453: close csr_mandatory_org_info_types;
1454:
1455: hr_utility.trace('p_legislation_code = ' || p_legislation_code);
1456: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1457:
1458: return l_defined;
1459:
1460: EXCEPTION
1459:
1460: EXCEPTION
1461: when others then
1462: l_error_message := 'Error in ' || l_proc;
1463: hr_utility.trace(l_error_message || '-' || sqlerrm);
1464: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1465: hr_utility.raise_error;
1466:
1467: END mandatory_org_info_types;
1460: EXCEPTION
1461: when others then
1462: l_error_message := 'Error in ' || l_proc;
1463: hr_utility.trace(l_error_message || '-' || sqlerrm);
1464: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1465: hr_utility.raise_error;
1466:
1467: END mandatory_org_info_types;
1468:
1461: when others then
1462: l_error_message := 'Error in ' || l_proc;
1463: hr_utility.trace(l_error_message || '-' || sqlerrm);
1464: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1465: hr_utility.raise_error;
1466:
1467: END mandatory_org_info_types;
1468:
1469: /* --------------------------------------------------------------------------
1486: l_enabled_flag varchar2(30);
1487:
1488: BEGIN
1489:
1490: hr_utility.set_location('Entering:'|| l_proc, 10);
1491:
1492: open csr_country_currency(p_legislation_code);
1493: fetch csr_country_currency into l_enabled_flag;
1494: if csr_country_currency%FOUND then
1491:
1492: open csr_country_currency(p_legislation_code);
1493: fetch csr_country_currency into l_enabled_flag;
1494: if csr_country_currency%FOUND then
1495: hr_utility.trace('l_enabled_flag = ' || l_enabled_flag);
1496: else
1497: hr_utility.trace('l_enabled_flag NOT DEFIINED ');
1498: end if;
1499: close csr_country_currency;
1493: fetch csr_country_currency into l_enabled_flag;
1494: if csr_country_currency%FOUND then
1495: hr_utility.trace('l_enabled_flag = ' || l_enabled_flag);
1496: else
1497: hr_utility.trace('l_enabled_flag NOT DEFIINED ');
1498: end if;
1499: close csr_country_currency;
1500:
1501: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1497: hr_utility.trace('l_enabled_flag NOT DEFIINED ');
1498: end if;
1499: close csr_country_currency;
1500:
1501: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1502:
1503: return l_enabled_flag;
1504:
1505: EXCEPTION
1504:
1505: EXCEPTION
1506: when others then
1507: l_error_message := 'Error in ' || l_proc;
1508: hr_utility.trace(l_error_message || '-' || sqlerrm);
1509: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1510: hr_utility.raise_error;
1511:
1512: END check_currency_enabled;
1505: EXCEPTION
1506: when others then
1507: l_error_message := 'Error in ' || l_proc;
1508: hr_utility.trace(l_error_message || '-' || sqlerrm);
1509: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1510: hr_utility.raise_error;
1511:
1512: END check_currency_enabled;
1513:
1506: when others then
1507: l_error_message := 'Error in ' || l_proc;
1508: hr_utility.trace(l_error_message || '-' || sqlerrm);
1509: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1510: hr_utility.raise_error;
1511:
1512: END check_currency_enabled;
1513:
1514:
1532: l_currency_code varchar2(30);
1533:
1534: BEGIN
1535:
1536: hr_utility.set_location('Entering:'|| l_proc, 10);
1537:
1538: open csr_country_currency(p_legislation_code);
1539: fetch csr_country_currency into l_currency_code;
1540: if csr_country_currency%FOUND then
1537:
1538: open csr_country_currency(p_legislation_code);
1539: fetch csr_country_currency into l_currency_code;
1540: if csr_country_currency%FOUND then
1541: hr_utility.trace('l_currency_code = ' || l_currency_code);
1542: else
1543: hr_utility.trace('l_currency_code NOT DEFIINED ');
1544: end if;
1545: close csr_country_currency;
1539: fetch csr_country_currency into l_currency_code;
1540: if csr_country_currency%FOUND then
1541: hr_utility.trace('l_currency_code = ' || l_currency_code);
1542: else
1543: hr_utility.trace('l_currency_code NOT DEFIINED ');
1544: end if;
1545: close csr_country_currency;
1546:
1547: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1543: hr_utility.trace('l_currency_code NOT DEFIINED ');
1544: end if;
1545: close csr_country_currency;
1546:
1547: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1548:
1549: return l_currency_code;
1550:
1551: EXCEPTION
1550:
1551: EXCEPTION
1552: when others then
1553: l_error_message := 'Error in ' || l_proc;
1554: hr_utility.trace(l_error_message || '-' || sqlerrm);
1555: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1556: hr_utility.raise_error;
1557:
1558: END get_country_currency;
1551: EXCEPTION
1552: when others then
1553: l_error_message := 'Error in ' || l_proc;
1554: hr_utility.trace(l_error_message || '-' || sqlerrm);
1555: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1556: hr_utility.raise_error;
1557:
1558: END get_country_currency;
1559:
1552: when others then
1553: l_error_message := 'Error in ' || l_proc;
1554: hr_utility.trace(l_error_message || '-' || sqlerrm);
1555: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1556: hr_utility.raise_error;
1557:
1558: END get_country_currency;
1559:
1560: /* --------------------------------------------------------------------------
1576: l_error_message varchar2(360);
1577:
1578: BEGIN
1579:
1580: hr_utility.set_location('Entering:'|| l_proc, 10);
1581: hr_utility.trace('p_legislation_code = '|| p_legislation_code);
1582:
1583: open csr_country_currency(p_legislation_code);
1584: fetch csr_country_currency into l_currency_code;
1577:
1578: BEGIN
1579:
1580: hr_utility.set_location('Entering:'|| l_proc, 10);
1581: hr_utility.trace('p_legislation_code = '|| p_legislation_code);
1582:
1583: open csr_country_currency(p_legislation_code);
1584: fetch csr_country_currency into l_currency_code;
1585: if csr_country_currency%FOUND then
1583: open csr_country_currency(p_legislation_code);
1584: fetch csr_country_currency into l_currency_code;
1585: if csr_country_currency%FOUND then
1586: update fnd_currencies set enabled_flag = 'Y' where currency_code = l_currency_code;
1587: hr_utility.trace('Enabled Currecny = ' || l_currency_code);
1588: else
1589: hr_utility.trace('l_currency_code NOT DEFIINED ');
1590: end if;
1591: close csr_country_currency;
1585: if csr_country_currency%FOUND then
1586: update fnd_currencies set enabled_flag = 'Y' where currency_code = l_currency_code;
1587: hr_utility.trace('Enabled Currecny = ' || l_currency_code);
1588: else
1589: hr_utility.trace('l_currency_code NOT DEFIINED ');
1590: end if;
1591: close csr_country_currency;
1592:
1593: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1589: hr_utility.trace('l_currency_code NOT DEFIINED ');
1590: end if;
1591: close csr_country_currency;
1592:
1593: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1594:
1595: EXCEPTION
1596: when others then
1597: l_error_message := 'Error in ' || l_proc;
1594:
1595: EXCEPTION
1596: when others then
1597: l_error_message := 'Error in ' || l_proc;
1598: hr_utility.trace(l_error_message || '-' || sqlerrm);
1599: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1600: hr_utility.raise_error;
1601:
1602: END enable_country_currency;
1595: EXCEPTION
1596: when others then
1597: l_error_message := 'Error in ' || l_proc;
1598: hr_utility.trace(l_error_message || '-' || sqlerrm);
1599: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1600: hr_utility.raise_error;
1601:
1602: END enable_country_currency;
1603:
1596: when others then
1597: l_error_message := 'Error in ' || l_proc;
1598: hr_utility.trace(l_error_message || '-' || sqlerrm);
1599: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1600: hr_utility.raise_error;
1601:
1602: END enable_country_currency;
1603:
1604: /* --------------------------------------------------------------------------
1632: l_valueset_name fnd_flex_value_sets.flex_value_set_name%type;
1633:
1634: BEGIN
1635:
1636: hr_utility.set_location('Entering:'|| l_proc, 10);
1637:
1638: fnd_flex_val_api.set_session_mode('customer_data');
1639:
1640: if p_valueset_type = 'CHAR' then
1664:
1665: l_valueset_name := p_valueset_name;
1666: l_value_set_exists := fnd_flex_val_api.valueset_exists(value_set => l_valueset_name);
1667:
1668: hr_utility.set_location(l_proc, 20);
1669: if not (l_value_set_exists) then
1670: hr_utility.set_location(l_proc, 20);
1671: fnd_flex_val_api.create_valueset_independent
1672: (value_set_name => p_valueset_name
1666: l_value_set_exists := fnd_flex_val_api.valueset_exists(value_set => l_valueset_name);
1667:
1668: hr_utility.set_location(l_proc, 20);
1669: if not (l_value_set_exists) then
1670: hr_utility.set_location(l_proc, 20);
1671: fnd_flex_val_api.create_valueset_independent
1672: (value_set_name => p_valueset_name
1673: ,description => l_description
1674: ,security_available => l_security_available
1684: l_log_message := 'Created VALUESET ' || p_valueset_name;
1685: per_ri_config_utilities.write_log(p_message => l_log_message);
1686: end if;
1687:
1688: hr_utility.set_location(' Leaving:'|| l_proc, 30);
1689:
1690: EXCEPTION
1691: when others then
1692: l_error_message := 'Error in ' || l_proc;
1689:
1690: EXCEPTION
1691: when others then
1692: l_error_message := 'Error in ' || l_proc;
1693: hr_utility.trace(l_error_message || '-' || sqlerrm);
1694: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1695: hr_utility.raise_error;
1696:
1697: End create_valueset;
1690: EXCEPTION
1691: when others then
1692: l_error_message := 'Error in ' || l_proc;
1693: hr_utility.trace(l_error_message || '-' || sqlerrm);
1694: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1695: hr_utility.raise_error;
1696:
1697: End create_valueset;
1698:
1691: when others then
1692: l_error_message := 'Error in ' || l_proc;
1693: hr_utility.trace(l_error_message || '-' || sqlerrm);
1694: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1695: hr_utility.raise_error;
1696:
1697: End create_valueset;
1698:
1699: /* --------------------------------------------------------------------------
1720: l_proc varchar2(72) := g_package || 'check_org_class_lookup_tag';
1721: l_error_message varchar2(360);
1722:
1723: BEGIN
1724: hr_utility.set_location('Entering:'|| l_proc, 10);
1725:
1726: if p_lookup_code = 'IN_COMPANY' then
1727: l_enabled := FALSE;
1728: return l_enabled;
1735: end if;
1736: l_plus_tag := '+' || p_legislation_code;
1737:
1738: if l_tag is NOT NULL and instr(l_tag,l_plus_tag)> 0 then
1739: hr_utility.set_location(l_proc, 30);
1740: l_enabled := TRUE;
1741: end if;
1742: close csr_org_class;
1743: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1739: hr_utility.set_location(l_proc, 30);
1740: l_enabled := TRUE;
1741: end if;
1742: close csr_org_class;
1743: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1744: return l_enabled;
1745:
1746: EXCEPTION
1747: when others then
1745:
1746: EXCEPTION
1747: when others then
1748: l_error_message := 'Error in ' || l_proc;
1749: hr_utility.trace(l_error_message || '-' || sqlerrm);
1750: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1751: hr_utility.raise_error;
1752:
1753: END check_org_class_lookup_tag;
1746: EXCEPTION
1747: when others then
1748: l_error_message := 'Error in ' || l_proc;
1749: hr_utility.trace(l_error_message || '-' || sqlerrm);
1750: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1751: hr_utility.raise_error;
1752:
1753: END check_org_class_lookup_tag;
1754:
1747: when others then
1748: l_error_message := 'Error in ' || l_proc;
1749: hr_utility.trace(l_error_message || '-' || sqlerrm);
1750: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1751: hr_utility.raise_error;
1752:
1753: END check_org_class_lookup_tag;
1754:
1755: /* --------------------------------------------------------------------------
1792: l_proc varchar2(72) := g_package || 'get_selected_country_list';
1793: l_error_message varchar2(360);
1794:
1795: BEGIN
1796: hr_utility.set_location('Entering:'|| l_proc, 10);
1797: FOR i in get_country_list LOOP
1798: open get_country_name(i.businessgroup);
1799: fetch get_country_name into l_country_name;
1800: hr_utility.trace('l_country_name = ' || l_country_name);
1796: hr_utility.set_location('Entering:'|| l_proc, 10);
1797: FOR i in get_country_list LOOP
1798: open get_country_name(i.businessgroup);
1799: fetch get_country_name into l_country_name;
1800: hr_utility.trace('l_country_name = ' || l_country_name);
1801: l_business_group := i.BusinessGroup;
1802: if get_country_name%NOTFOUND then
1803: l_business_group := 'INT';
1804: l_country_name := 'International';
1805: end if;
1806: close get_country_name;
1807:
1808: l_ret_string := l_ret_string || '^' || l_business_group ||'-' || l_country_name;
1809: hr_utility.trace('l_ret_string = ' || l_ret_string);
1810: END LOOP;
1811:
1812: p_country_list := ltrim(l_ret_string,',');
1813: hr_utility.trace('p_country_list = ' || p_country_list);
1809: hr_utility.trace('l_ret_string = ' || l_ret_string);
1810: END LOOP;
1811:
1812: p_country_list := ltrim(l_ret_string,',');
1813: hr_utility.trace('p_country_list = ' || p_country_list);
1814: FOR i in get_selected_list LOOP
1815: p_selected_list := p_selected_list ||'^' || i.config_information2;
1816: END LOOP;
1817:
1815: p_selected_list := p_selected_list ||'^' || i.config_information2;
1816: END LOOP;
1817:
1818: p_selected_list := ltrim(p_selected_list,',');
1819: hr_utility.trace('p_selected_list = ' || p_selected_list);
1820: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1821:
1822: EXCEPTION
1823: when others then
1816: END LOOP;
1817:
1818: p_selected_list := ltrim(p_selected_list,',');
1819: hr_utility.trace('p_selected_list = ' || p_selected_list);
1820: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1821:
1822: EXCEPTION
1823: when others then
1824: l_error_message := 'Error in ' || l_proc;
1821:
1822: EXCEPTION
1823: when others then
1824: l_error_message := 'Error in ' || l_proc;
1825: hr_utility.trace(l_error_message || '-' || sqlerrm);
1826: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1827: hr_utility.raise_error;
1828:
1829: END get_selected_country_list;
1822: EXCEPTION
1823: when others then
1824: l_error_message := 'Error in ' || l_proc;
1825: hr_utility.trace(l_error_message || '-' || sqlerrm);
1826: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1827: hr_utility.raise_error;
1828:
1829: END get_selected_country_list;
1830:
1823: when others then
1824: l_error_message := 'Error in ' || l_proc;
1825: hr_utility.trace(l_error_message || '-' || sqlerrm);
1826: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1827: hr_utility.raise_error;
1828:
1829: END get_selected_country_list;
1830:
1831:
1858: l_proc varchar2(72) := g_package || 'get_display_country_list';
1859: l_error_message varchar2(360);
1860:
1861: BEGIN
1862: hr_utility.set_location('Entering:'|| l_proc, 10);
1863: for i in get_selected_country loop
1864: open get_bg_display_name(i.business_group);
1865: fetch get_bg_display_name into l_bg_name;
1866: hr_utility.trace(i.business_group || '-' || l_bg_name);
1862: hr_utility.set_location('Entering:'|| l_proc, 10);
1863: for i in get_selected_country loop
1864: open get_bg_display_name(i.business_group);
1865: fetch get_bg_display_name into l_bg_name;
1866: hr_utility.trace(i.business_group || '-' || l_bg_name);
1867: if (get_bg_display_name%notfound) then
1868: l_bg_name := 'International';
1869: end if;
1870: l_ret_string := l_ret_string || ',' || l_bg_name;
1869: end if;
1870: l_ret_string := l_ret_string || ',' || l_bg_name;
1871: close get_bg_display_name;
1872: end loop;
1873: hr_utility.trace('l_ret_string = ' || l_ret_string);
1874: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1875: return ltrim(l_ret_string,',');
1876:
1877: EXCEPTION
1870: l_ret_string := l_ret_string || ',' || l_bg_name;
1871: close get_bg_display_name;
1872: end loop;
1873: hr_utility.trace('l_ret_string = ' || l_ret_string);
1874: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1875: return ltrim(l_ret_string,',');
1876:
1877: EXCEPTION
1878: when others then
1876:
1877: EXCEPTION
1878: when others then
1879: l_error_message := 'Error in ' || l_proc;
1880: hr_utility.trace(l_error_message || '-' || sqlerrm);
1881: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1882: hr_utility.raise_error;
1883:
1884: END get_display_country_list;
1877: EXCEPTION
1878: when others then
1879: l_error_message := 'Error in ' || l_proc;
1880: hr_utility.trace(l_error_message || '-' || sqlerrm);
1881: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1882: hr_utility.raise_error;
1883:
1884: END get_display_country_list;
1885:
1878: when others then
1879: l_error_message := 'Error in ' || l_proc;
1880: hr_utility.trace(l_error_message || '-' || sqlerrm);
1881: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1882: hr_utility.raise_error;
1883:
1884: END get_display_country_list;
1885:
1886: /* --------------------------------------------------------------------------
1907: l_ret_string varchar2(2000);
1908: l_error_message varchar2(360);
1909:
1910: BEGIN
1911: hr_utility.set_location('Entering:'|| l_proc, 10);
1912: FOR i in get_selected_list LOOP
1913: l_ret_string := l_ret_string || ',' || i.country;
1914: end loop;
1915: hr_utility.trace('l_ret_string = ' || l_ret_string);
1911: hr_utility.set_location('Entering:'|| l_proc, 10);
1912: FOR i in get_selected_list LOOP
1913: l_ret_string := l_ret_string || ',' || i.country;
1914: end loop;
1915: hr_utility.trace('l_ret_string = ' || l_ret_string);
1916: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1917: return ltrim(l_ret_string,',');
1918: EXCEPTION
1919: when others then
1912: FOR i in get_selected_list LOOP
1913: l_ret_string := l_ret_string || ',' || i.country;
1914: end loop;
1915: hr_utility.trace('l_ret_string = ' || l_ret_string);
1916: hr_utility.set_location(' Leaving:'|| l_proc, 10);
1917: return ltrim(l_ret_string,',');
1918: EXCEPTION
1919: when others then
1920: l_error_message := 'Error in ' || l_proc;
1917: return ltrim(l_ret_string,',');
1918: EXCEPTION
1919: when others then
1920: l_error_message := 'Error in ' || l_proc;
1921: hr_utility.trace(l_error_message || '-' || sqlerrm);
1922: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1923: hr_utility.raise_error;
1924:
1925: END get_country_list;
1918: EXCEPTION
1919: when others then
1920: l_error_message := 'Error in ' || l_proc;
1921: hr_utility.trace(l_error_message || '-' || sqlerrm);
1922: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1923: hr_utility.raise_error;
1924:
1925: END get_country_list;
1926:
1919: when others then
1920: l_error_message := 'Error in ' || l_proc;
1921: hr_utility.trace(l_error_message || '-' || sqlerrm);
1922: hr_utility.set_location(' Leaving:'|| l_proc, 500);
1923: hr_utility.raise_error;
1924:
1925: END get_country_list;
1926:
1927: /* --------------------------------------------------------------------------
1954: l_id_flex_num fnd_id_flex_structures_vl.id_flex_num%type;
1955: l_request_id number(9);
1956:
1957: BEGIN
1958: hr_utility.set_location('Entering:'|| l_proc, 10);
1959:
1960: open flex_num_cursor;
1961: fetch flex_num_cursor into l_id_flex_num;
1962: close flex_num_cursor;
1966: l_flexfield := fnd_flex_key_api.find_flexfield
1967: (appl_short_name => p_appl_short_name
1968: ,flex_code => p_flex_code );
1969:
1970: hr_utility.set_location(l_proc, 20);
1971:
1972: l_structure := fnd_flex_key_api.find_structure
1973: (flexfield => l_flexfield
1974: ,structure_code => p_structure_code );
1972: l_structure := fnd_flex_key_api.find_structure
1973: (flexfield => l_flexfield
1974: ,structure_code => p_structure_code );
1975:
1976: hr_utility.set_location(l_proc, 30);
1977:
1978: --
1979: -- freeze flexfield
1980: --
1981: l_new_structure := l_structure;
1982:
1983: l_new_structure.freeze_flag := 'Y';
1984:
1985: hr_utility.set_location('Entering:'|| l_proc, 30);
1986:
1987: fnd_flex_key_api.modify_structure(l_flexfield, l_structure,l_new_structure);
1988:
1989: --
2018: l_log_message := 'Submitted Concurrent Request to Compile KEY FLEX ' || p_appl_short_name
2019: || ' ' || p_flex_code || ' ' || p_structure_code;
2020: per_ri_config_utilities.write_log(p_message => l_log_message);
2021:
2022: hr_utility.set_location(' Leaving:'|| l_proc, 50);
2023:
2024: EXCEPTION
2025: when others then
2026: null;
2025: when others then
2026: null;
2027: -- Ignore for now FOR TESTING
2028: --l_error_message := 'Error in ' || l_proc;
2029: --hr_utility.trace(l_error_message || '-' || sqlerrm);
2030: --hr_utility.set_location(' Leaving:'|| l_proc, 500);
2031: --hr_utility.raise_error;
2032:
2033: END freeze_and_compile_flexfield;
2026: null;
2027: -- Ignore for now FOR TESTING
2028: --l_error_message := 'Error in ' || l_proc;
2029: --hr_utility.trace(l_error_message || '-' || sqlerrm);
2030: --hr_utility.set_location(' Leaving:'|| l_proc, 500);
2031: --hr_utility.raise_error;
2032:
2033: END freeze_and_compile_flexfield;
2034:
2027: -- Ignore for now FOR TESTING
2028: --l_error_message := 'Error in ' || l_proc;
2029: --hr_utility.trace(l_error_message || '-' || sqlerrm);
2030: --hr_utility.set_location(' Leaving:'|| l_proc, 500);
2031: --hr_utility.raise_error;
2032:
2033: END freeze_and_compile_flexfield;
2034:
2035:
2052: l_proc varchar2(72) := g_package || 'get_country_display_name';
2053: l_error_message varchar2(360);
2054:
2055: BEGIN
2056: hr_utility.set_location('Entering:'|| l_proc, 10);
2057:
2058: if p_territory_code = 'INT' then
2059: hr_utility.set_location(' Leaving:'|| l_proc, 30);
2060: return 'International';
2055: BEGIN
2056: hr_utility.set_location('Entering:'|| l_proc, 10);
2057:
2058: if p_territory_code = 'INT' then
2059: hr_utility.set_location(' Leaving:'|| l_proc, 30);
2060: return 'International';
2061: else
2062: open csr_country(p_territory_code);
2063: loop
2062: open csr_country(p_territory_code);
2063: loop
2064: fetch csr_country into l_territory_short_name;
2065: exit when csr_country%NOTFOUND;
2066: hr_utility.set_location(' Leaving:'|| l_proc, 40);
2067: end loop;
2068: return l_territory_short_name;
2069: end if;
2070:
2070:
2071: EXCEPTION
2072: when others then
2073: l_error_message := 'Error in ' || l_proc;
2074: hr_utility.trace(l_error_message || '-' || sqlerrm);
2075: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2076: hr_utility.raise_error;
2077:
2078: END get_country_display_name;
2071: EXCEPTION
2072: when others then
2073: l_error_message := 'Error in ' || l_proc;
2074: hr_utility.trace(l_error_message || '-' || sqlerrm);
2075: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2076: hr_utility.raise_error;
2077:
2078: END get_country_display_name;
2079:
2072: when others then
2073: l_error_message := 'Error in ' || l_proc;
2074: hr_utility.trace(l_error_message || '-' || sqlerrm);
2075: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2076: hr_utility.raise_error;
2077:
2078: END get_country_display_name;
2079:
2080:
2113: from pay_leg_setup_defaults
2114: where legislation_code = cp_legislation_code;
2115:
2116: BEGIN
2117: hr_utility.set_location('Entering:'|| l_proc, 10);
2118:
2119: if p_country_tab.count > 0 THEN
2120: for i in p_country_tab.first ..
2121: p_country_tab.last LOOP
2119: if p_country_tab.count > 0 THEN
2120: for i in p_country_tab.first ..
2121: p_country_tab.last LOOP
2122: l_legislation_code := p_country_tab(i).territory_code;
2123: hr_utility.trace('p_country_tab.element = ' || l_legislation_code);
2124: if l_legislation_code <> 'INT' then
2125:
2126: if NOT (per_ri_config_utilities.legislation_support(l_legislation_code, 'PAY'))
2127: and NOT (per_ri_config_utilities.legislation_support(l_legislation_code, 'PER')) then
2158: end if;
2159: END LOOP;
2160: end if;
2161:
2162: hr_utility.set_location(' Leaving:'|| l_proc, 40);
2163: EXCEPTION
2164: when others then
2165: l_error_message := 'Error in ' || l_proc;
2166: hr_utility.trace(l_error_message || '-' || sqlerrm);
2162: hr_utility.set_location(' Leaving:'|| l_proc, 40);
2163: EXCEPTION
2164: when others then
2165: l_error_message := 'Error in ' || l_proc;
2166: hr_utility.trace(l_error_message || '-' || sqlerrm);
2167: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2168: hr_utility.raise_error;
2169:
2170: END submit_int_payroll_request;
2163: EXCEPTION
2164: when others then
2165: l_error_message := 'Error in ' || l_proc;
2166: hr_utility.trace(l_error_message || '-' || sqlerrm);
2167: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2168: hr_utility.raise_error;
2169:
2170: END submit_int_payroll_request;
2171:
2164: when others then
2165: l_error_message := 'Error in ' || l_proc;
2166: hr_utility.trace(l_error_message || '-' || sqlerrm);
2167: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2168: hr_utility.raise_error;
2169:
2170: END submit_int_payroll_request;
2171:
2172:
2216: l_log_message varchar2(360);
2217: l_error_message varchar2(360);
2218:
2219: BEGIN
2220: hr_utility.set_location('Entering:'|| l_proc, 10);
2221:
2222: -- open csr_user;
2223: -- fetch csr_user into l_user_id;
2224: -- close csr_user;
2243: -- open csr_responsibility(l_responsibility_key);
2244: -- fetch csr_responsibility into l_responsibility_application_i,l_responsibility_id;
2245: -- close csr_responsibility;
2246: --
2247: -- hr_utility.trace('11 l_user_id = ' || l_user_id);
2248: -- hr_utility.trace('11 l_business_group_id = ' || l_business_group_id);
2249: -- hr_utility.trace('11 l_responsibility_id = ' || l_responsibility_id);
2250: -- hr_utility.trace('11 p_responsibility_application_i = ' || l_responsibility_application_i);
2251: --
2244: -- fetch csr_responsibility into l_responsibility_application_i,l_responsibility_id;
2245: -- close csr_responsibility;
2246: --
2247: -- hr_utility.trace('11 l_user_id = ' || l_user_id);
2248: -- hr_utility.trace('11 l_business_group_id = ' || l_business_group_id);
2249: -- hr_utility.trace('11 l_responsibility_id = ' || l_responsibility_id);
2250: -- hr_utility.trace('11 p_responsibility_application_i = ' || l_responsibility_application_i);
2251: --
2252: -- per_sec_profile_asg_api.create_security_profile_asg
2245: -- close csr_responsibility;
2246: --
2247: -- hr_utility.trace('11 l_user_id = ' || l_user_id);
2248: -- hr_utility.trace('11 l_business_group_id = ' || l_business_group_id);
2249: -- hr_utility.trace('11 l_responsibility_id = ' || l_responsibility_id);
2250: -- hr_utility.trace('11 p_responsibility_application_i = ' || l_responsibility_application_i);
2251: --
2252: -- per_sec_profile_asg_api.create_security_profile_asg
2253: -- (p_validate => false
2246: --
2247: -- hr_utility.trace('11 l_user_id = ' || l_user_id);
2248: -- hr_utility.trace('11 l_business_group_id = ' || l_business_group_id);
2249: -- hr_utility.trace('11 l_responsibility_id = ' || l_responsibility_id);
2250: -- hr_utility.trace('11 p_responsibility_application_i = ' || l_responsibility_application_i);
2251: --
2252: -- per_sec_profile_asg_api.create_security_profile_asg
2253: -- (p_validate => false
2254: -- ,p_sec_profile_assignment_id => l_sec_profile_assignment_id
2261: -- ,p_responsibility_application_i => l_responsibility_application_i
2262: -- ,p_start_date => g_config_effective_date
2263: -- ,p_end_date => null
2264: -- ,p_object_version_number => l_ovn);
2265: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2266: -- hr_utility.trace('l_user_id = ' || l_user_id);
2267: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2268: -- hr_utility.trace('l_business_group_id = ' || l_business_group_id);
2269: -- hr_utility.trace('l_responsibility_id = ' || l_responsibility_id);
2262: -- ,p_start_date => g_config_effective_date
2263: -- ,p_end_date => null
2264: -- ,p_object_version_number => l_ovn);
2265: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2266: -- hr_utility.trace('l_user_id = ' || l_user_id);
2267: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2268: -- hr_utility.trace('l_business_group_id = ' || l_business_group_id);
2269: -- hr_utility.trace('l_responsibility_id = ' || l_responsibility_id);
2270: -- hr_utility.trace('p_responsibility_application_i = ' || l_responsibility_application_i);
2263: -- ,p_end_date => null
2264: -- ,p_object_version_number => l_ovn);
2265: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2266: -- hr_utility.trace('l_user_id = ' || l_user_id);
2267: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2268: -- hr_utility.trace('l_business_group_id = ' || l_business_group_id);
2269: -- hr_utility.trace('l_responsibility_id = ' || l_responsibility_id);
2270: -- hr_utility.trace('p_responsibility_application_i = ' || l_responsibility_application_i);
2271: --
2264: -- ,p_object_version_number => l_ovn);
2265: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2266: -- hr_utility.trace('l_user_id = ' || l_user_id);
2267: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2268: -- hr_utility.trace('l_business_group_id = ' || l_business_group_id);
2269: -- hr_utility.trace('l_responsibility_id = ' || l_responsibility_id);
2270: -- hr_utility.trace('p_responsibility_application_i = ' || l_responsibility_application_i);
2271: --
2272: -- l_log_message := 'Created Security Profile Assignment ' || l_business_group_id;
2265: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2266: -- hr_utility.trace('l_user_id = ' || l_user_id);
2267: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2268: -- hr_utility.trace('l_business_group_id = ' || l_business_group_id);
2269: -- hr_utility.trace('l_responsibility_id = ' || l_responsibility_id);
2270: -- hr_utility.trace('p_responsibility_application_i = ' || l_responsibility_application_i);
2271: --
2272: -- l_log_message := 'Created Security Profile Assignment ' || l_business_group_id;
2273: -- per_ri_config_utilities.write_log(p_message => l_log_message);
2266: -- hr_utility.trace('l_user_id = ' || l_user_id);
2267: -- hr_utility.trace('l_sec_profile_assignment_id = ' || l_sec_profile_assignment_id);
2268: -- hr_utility.trace('l_business_group_id = ' || l_business_group_id);
2269: -- hr_utility.trace('l_responsibility_id = ' || l_responsibility_id);
2270: -- hr_utility.trace('p_responsibility_application_i = ' || l_responsibility_application_i);
2271: --
2272: -- l_log_message := 'Created Security Profile Assignment ' || l_business_group_id;
2273: -- per_ri_config_utilities.write_log(p_message => l_log_message);
2274: --
2273: -- per_ri_config_utilities.write_log(p_message => l_log_message);
2274: --
2275: -- end loop;
2276: -- end if;
2277: hr_utility.set_location(' Leaving:'|| l_proc, 100);
2278: EXCEPTION
2279: when others then
2280: l_error_message := 'Error in ' || l_proc;
2281: hr_utility.trace(l_error_message || '-' || sqlerrm);
2277: hr_utility.set_location(' Leaving:'|| l_proc, 100);
2278: EXCEPTION
2279: when others then
2280: l_error_message := 'Error in ' || l_proc;
2281: hr_utility.trace(l_error_message || '-' || sqlerrm);
2282: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2283:
2284:
2285: END create_security_profile_assign;
2278: EXCEPTION
2279: when others then
2280: l_error_message := 'Error in ' || l_proc;
2281: hr_utility.trace(l_error_message || '-' || sqlerrm);
2282: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2283:
2284:
2285: END create_security_profile_assign;
2286:
2315: from per_ri_configurations_vl
2316: where configuration_code = p_configuration_code;
2317:
2318: BEGIN
2319: hr_utility.set_location('Entering:'|| l_proc, 10);
2320:
2321: open csr_configuration(p_configuration_code);
2322:
2323: fetch csr_configuration into l_configuration_code
2326: ,l_configuration_name
2327: ,l_configuration_description
2328: ,l_object_version_number;
2329:
2330: hr_utility.trace('l_object_version_number before =' || l_object_version_number);
2331: if csr_configuration%FOUND then
2332: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2333: per_ri_configuration_api.update_configuration
2334: (p_configuration_code => l_configuration_code
2328: ,l_object_version_number;
2329:
2330: hr_utility.trace('l_object_version_number before =' || l_object_version_number);
2331: if csr_configuration%FOUND then
2332: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2333: per_ri_configuration_api.update_configuration
2334: (p_configuration_code => l_configuration_code
2335: ,p_configuration_type => l_configuration_type
2336: ,p_configuration_status => 'LOADED'
2338: ,p_configuration_description => l_configuration_description
2339: ,p_language_code => hr_api.userenv_lang
2340: ,p_effective_date => null
2341: ,p_object_version_number => l_object_version_number);
2342: hr_utility.trace('l_object_version_number after =' || l_object_version_number);
2343: end if;
2344: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2345: EXCEPTION
2346: when others then
2340: ,p_effective_date => null
2341: ,p_object_version_number => l_object_version_number);
2342: hr_utility.trace('l_object_version_number after =' || l_object_version_number);
2343: end if;
2344: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2345: EXCEPTION
2346: when others then
2347: l_error_message := 'Error in ' || l_proc;
2348: hr_utility.trace(l_error_message || '-' || sqlerrm);
2344: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2345: EXCEPTION
2346: when others then
2347: l_error_message := 'Error in ' || l_proc;
2348: hr_utility.trace(l_error_message || '-' || sqlerrm);
2349: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2350:
2351: END update_configuration_status;
2352:
2345: EXCEPTION
2346: when others then
2347: l_error_message := 'Error in ' || l_proc;
2348: hr_utility.trace(l_error_message || '-' || sqlerrm);
2349: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2350:
2351: END update_configuration_status;
2352:
2353:
2371: l_hrms boolean;
2372: l_hr boolean;
2373:
2374: BEGIN
2375: hr_utility.set_location('Entering:'|| l_proc, 10);
2376:
2377: l_shrms := per_ri_config_utilities.responsibility_exists
2378: (p_country_code => p_country_code
2379: ,p_assign_responsibility => 'SHRMS');
2395: return 'PER';
2396: end if;
2397:
2398: return 'PER'; -- return PER is can not make a decision
2399: hr_utility.set_location(' Leaving:'|| l_proc, 30);
2400:
2401: EXCEPTION
2402: when others then
2403: l_error_message := 'Error in ' || l_proc;
2400:
2401: EXCEPTION
2402: when others then
2403: l_error_message := 'Error in ' || l_proc;
2404: hr_utility.trace(l_error_message || '-' || sqlerrm);
2405: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2406: hr_utility.raise_error;
2407:
2408: END determine_country_resp;
2401: EXCEPTION
2402: when others then
2403: l_error_message := 'Error in ' || l_proc;
2404: hr_utility.trace(l_error_message || '-' || sqlerrm);
2405: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2406: hr_utility.raise_error;
2407:
2408: END determine_country_resp;
2409:
2402: when others then
2403: l_error_message := 'Error in ' || l_proc;
2404: hr_utility.trace(l_error_message || '-' || sqlerrm);
2405: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2406: hr_utility.raise_error;
2407:
2408: END determine_country_resp;
2409:
2410: /* --------------------------------------------------------------------------
2434: l_assign_responsibility varchar2(30);
2435: l_resp_exists boolean default FALSE;
2436:
2437: BEGIN
2438: hr_utility.set_location('Entering:'|| l_proc, 10);
2439:
2440: open csr_responsibility(p_country_code
2441: ,p_assign_responsibility);
2442: fetch csr_responsibility into l_responsibility_application;
2441: ,p_assign_responsibility);
2442: fetch csr_responsibility into l_responsibility_application;
2443: if csr_responsibility%FOUND then
2444: l_resp_exists := TRUE;
2445: hr_utility.trace('Responsibility exists' || p_country_code );
2446: hr_utility.trace('Responsibility exists' || p_assign_responsibility );
2447: else
2448: l_resp_exists := FALSE;
2449: hr_utility.trace('Responsibility exists' || p_country_code );
2442: fetch csr_responsibility into l_responsibility_application;
2443: if csr_responsibility%FOUND then
2444: l_resp_exists := TRUE;
2445: hr_utility.trace('Responsibility exists' || p_country_code );
2446: hr_utility.trace('Responsibility exists' || p_assign_responsibility );
2447: else
2448: l_resp_exists := FALSE;
2449: hr_utility.trace('Responsibility exists' || p_country_code );
2450: hr_utility.trace('Responsibility does not exists' || p_assign_responsibility );
2445: hr_utility.trace('Responsibility exists' || p_country_code );
2446: hr_utility.trace('Responsibility exists' || p_assign_responsibility );
2447: else
2448: l_resp_exists := FALSE;
2449: hr_utility.trace('Responsibility exists' || p_country_code );
2450: hr_utility.trace('Responsibility does not exists' || p_assign_responsibility );
2451: end if;
2452: close csr_responsibility;
2453: return l_resp_exists;
2446: hr_utility.trace('Responsibility exists' || p_assign_responsibility );
2447: else
2448: l_resp_exists := FALSE;
2449: hr_utility.trace('Responsibility exists' || p_country_code );
2450: hr_utility.trace('Responsibility does not exists' || p_assign_responsibility );
2451: end if;
2452: close csr_responsibility;
2453: return l_resp_exists;
2454:
2451: end if;
2452: close csr_responsibility;
2453: return l_resp_exists;
2454:
2455: hr_utility.set_location(' Leaving:'|| l_proc, 30);
2456:
2457: EXCEPTION
2458: when others then
2459: l_error_message := 'Error in ' || l_proc;
2456:
2457: EXCEPTION
2458: when others then
2459: l_error_message := 'Error in ' || l_proc;
2460: hr_utility.trace(l_error_message || '-' || sqlerrm);
2461: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2462: hr_utility.raise_error;
2463:
2464: END;
2457: EXCEPTION
2458: when others then
2459: l_error_message := 'Error in ' || l_proc;
2460: hr_utility.trace(l_error_message || '-' || sqlerrm);
2461: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2462: hr_utility.raise_error;
2463:
2464: END;
2465:
2458: when others then
2459: l_error_message := 'Error in ' || l_proc;
2460: hr_utility.trace(l_error_message || '-' || sqlerrm);
2461: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2462: hr_utility.raise_error;
2463:
2464: END;
2465:
2466:
2485: l_currency_code varchar2(30);
2486: l_tax_start_date date;
2487:
2488: BEGIN
2489: hr_utility.set_location('Entering:'|| l_proc, 10);
2490:
2491: -- Remove site level profile option
2492: --PER_SECURITY_PROFILE_ID
2493: per_ri_config_utilities.set_profile_option_value
2506: --(application => 'PER'
2507: --,program => 'HRSECGRP'
2508: --,description => 'Enterprise Structures Configuration'
2509: --,sub_request => FALSE);
2510: --hr_utility.trace('l_request_id = ' || to_char(l_request_id));
2511: --l_log_message := 'Created Enable Multiple Security Group process';
2512: --l_log_message := 'Created Enable Multiple Security Group process';
2513: --per_ri_config_utilities.write_log(p_message => l_log_message);
2514:
2512: --l_log_message := 'Created Enable Multiple Security Group process';
2513: --per_ri_config_utilities.write_log(p_message => l_log_message);
2514:
2515: --
2516: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2517: EXCEPTION
2518: when others then
2519: l_error_message := 'Error in ' || l_proc;
2520: hr_utility.trace(l_error_message || '-' || sqlerrm);
2516: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2517: EXCEPTION
2518: when others then
2519: l_error_message := 'Error in ' || l_proc;
2520: hr_utility.trace(l_error_message || '-' || sqlerrm);
2521: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2522: hr_utility.raise_error;
2523:
2524: END submit_enable_mult_sg_process;
2517: EXCEPTION
2518: when others then
2519: l_error_message := 'Error in ' || l_proc;
2520: hr_utility.trace(l_error_message || '-' || sqlerrm);
2521: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2522: hr_utility.raise_error;
2523:
2524: END submit_enable_mult_sg_process;
2525:
2518: when others then
2519: l_error_message := 'Error in ' || l_proc;
2520: hr_utility.trace(l_error_message || '-' || sqlerrm);
2521: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2522: hr_utility.raise_error;
2523:
2524: END submit_enable_mult_sg_process;
2525:
2526: /* --------------------------------------------------------------------------
2542: l_name per_business_groups.name%type;
2543: l_fresh_installed boolean default FALSE;
2544:
2545: BEGIN
2546: hr_utility.set_location('Entering:'|| l_proc, 10);
2547:
2548: open csr_bg_data;
2549: fetch csr_bg_data into l_name;
2550: if csr_bg_data%FOUND then
2548: open csr_bg_data;
2549: fetch csr_bg_data into l_name;
2550: if csr_bg_data%FOUND then
2551: l_fresh_installed := FALSE;
2552: hr_utility.trace('l_fresh_installed = ' || 'FALSE');
2553: else
2554: l_fresh_installed := TRUE;
2555: hr_utility.trace('l_fresh_installed = ' || 'TRUE');
2556: end if;
2551: l_fresh_installed := FALSE;
2552: hr_utility.trace('l_fresh_installed = ' || 'FALSE');
2553: else
2554: l_fresh_installed := TRUE;
2555: hr_utility.trace('l_fresh_installed = ' || 'TRUE');
2556: end if;
2557:
2558: return l_fresh_installed;
2559:
2556: end if;
2557:
2558: return l_fresh_installed;
2559:
2560: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2561: EXCEPTION
2562: when others then
2563: l_error_message := 'Error in ' || l_proc;
2564: hr_utility.trace(l_error_message || '-' || sqlerrm);
2560: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2561: EXCEPTION
2562: when others then
2563: l_error_message := 'Error in ' || l_proc;
2564: hr_utility.trace(l_error_message || '-' || sqlerrm);
2565: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2566: hr_utility.raise_error;
2567:
2568: END check_fresh_installation;
2561: EXCEPTION
2562: when others then
2563: l_error_message := 'Error in ' || l_proc;
2564: hr_utility.trace(l_error_message || '-' || sqlerrm);
2565: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2566: hr_utility.raise_error;
2567:
2568: END check_fresh_installation;
2569:
2562: when others then
2563: l_error_message := 'Error in ' || l_proc;
2564: hr_utility.trace(l_error_message || '-' || sqlerrm);
2565: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2566: hr_utility.raise_error;
2567:
2568: END check_fresh_installation;
2569:
2570:
2591: from hr_pump_batch_lines
2592: where batch_id = cp_patch_header_id);
2593:
2594: BEGIN
2595: hr_utility.set_location('Entering:'|| l_proc, 10);
2596:
2597: open csr_dp_exception(p_patch_header_id);
2598: fetch csr_dp_exception into l_exception_text;
2599: if csr_dp_exception%FOUND then
2601: per_ri_config_utilities.write_log(p_message => l_log_message);
2602:
2603: l_log_message := l_exception_text;
2604: per_ri_config_utilities.write_log(p_message => l_log_message);
2605: hr_utility.raise_error;
2606: end if;
2607: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2608: EXCEPTION
2609: when others then
2603: l_log_message := l_exception_text;
2604: per_ri_config_utilities.write_log(p_message => l_log_message);
2605: hr_utility.raise_error;
2606: end if;
2607: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2608: EXCEPTION
2609: when others then
2610: l_error_message := 'Error in ' || l_proc;
2611: hr_utility.trace(l_error_message || '-' || sqlerrm);
2607: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2608: EXCEPTION
2609: when others then
2610: l_error_message := 'Error in ' || l_proc;
2611: hr_utility.trace(l_error_message || '-' || sqlerrm);
2612: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2613: hr_utility.raise_error;
2614:
2615: END write_data_pump_exception_log;
2608: EXCEPTION
2609: when others then
2610: l_error_message := 'Error in ' || l_proc;
2611: hr_utility.trace(l_error_message || '-' || sqlerrm);
2612: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2613: hr_utility.raise_error;
2614:
2615: END write_data_pump_exception_log;
2616:
2609: when others then
2610: l_error_message := 'Error in ' || l_proc;
2611: hr_utility.trace(l_error_message || '-' || sqlerrm);
2612: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2613: hr_utility.raise_error;
2614:
2615: END write_data_pump_exception_log;
2616:
2617: /* --------------------------------------------------------------------------
2636: where source_id in ( select batch_line_id
2637: from hr_pump_batch_lines
2638: where batch_id = cp_patch_header_id);
2639: BEGIN
2640: hr_utility.set_location('Entering:'|| l_proc, 10);
2641:
2642: open csr_dp_exception(p_patch_header_id);
2643: fetch csr_dp_exception into l_exception_text;
2644: if csr_dp_exception%FOUND then
2645: l_exception := TRUE;
2646: else
2647: l_exception := FALSE;
2648: end if;
2649: hr_utility.set_location(' Leaving:'|| l_proc, 20);
2650: return l_exception;
2651: EXCEPTION
2652: when others then
2653: l_error_message := 'Error in ' || l_proc;
2650: return l_exception;
2651: EXCEPTION
2652: when others then
2653: l_error_message := 'Error in ' || l_proc;
2654: hr_utility.trace(l_error_message || '-' || sqlerrm);
2655: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2656: hr_utility.raise_error;
2657:
2658: END check_data_pump_exception;
2651: EXCEPTION
2652: when others then
2653: l_error_message := 'Error in ' || l_proc;
2654: hr_utility.trace(l_error_message || '-' || sqlerrm);
2655: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2656: hr_utility.raise_error;
2657:
2658: END check_data_pump_exception;
2659:
2652: when others then
2653: l_error_message := 'Error in ' || l_proc;
2654: hr_utility.trace(l_error_message || '-' || sqlerrm);
2655: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2656: hr_utility.raise_error;
2657:
2658: END check_data_pump_exception;
2659:
2660: /* --------------------------------------------------------------------------
2678: l_start_date varchar2(240) := to_char(per_ri_config_utilities.g_config_effective_date,'YYYY/MM/DD');
2679: l_end_date varchar2(240) := to_char(per_ri_config_utilities.g_config_effective_end_date,'YYYY/MM/DD');
2680:
2681: BEGIN
2682: hr_utility.set_location('Entering:'|| l_proc, 10);
2683: if NOT (p_technical_summary_mode) then
2684: fnd_user_resp_groups_api.load_row(
2685: x_user_name => upper(per_ri_config_utilities.return_config_entity_name_pre
2686: (per_ri_config_main.g_configuration_user_name)),
2703: p_hrms_misc_resp_tab(l_hrms_misc_resp_count).description := per_ri_config_main.g_description_string;
2704:
2705: l_hrms_misc_resp_count := l_hrms_misc_resp_count + 1 ;
2706: end if;
2707: hr_utility.trace('Assigned Responsibility: ' || 'GLB_SHRMS_MANAGER');
2708: hr_utility.set_location(l_proc, 20);
2709:
2710: l_enterprise_primary_industry := per_ri_config_utilities.get_ent_primary_industry
2711: (p_configuration_code => p_configuration_code);
2704:
2705: l_hrms_misc_resp_count := l_hrms_misc_resp_count + 1 ;
2706: end if;
2707: hr_utility.trace('Assigned Responsibility: ' || 'GLB_SHRMS_MANAGER');
2708: hr_utility.set_location(l_proc, 20);
2709:
2710: l_enterprise_primary_industry := per_ri_config_utilities.get_ent_primary_industry
2711: (p_configuration_code => p_configuration_code);
2712:
2734: p_hrms_misc_resp_tab(l_hrms_misc_resp_count).description := per_ri_config_main.g_description_string;
2735:
2736: l_hrms_misc_resp_count := l_hrms_misc_resp_count + 1 ;
2737: end if;
2738: hr_utility.trace('Assigned Responsibility: ' || 'US_GOV_HR_MANAGER');
2739: hr_utility.set_location(l_proc, 20);
2740: end if;
2741:
2742: hr_utility.set_location(' Leaving:'|| l_proc, 100);
2735:
2736: l_hrms_misc_resp_count := l_hrms_misc_resp_count + 1 ;
2737: end if;
2738: hr_utility.trace('Assigned Responsibility: ' || 'US_GOV_HR_MANAGER');
2739: hr_utility.set_location(l_proc, 20);
2740: end if;
2741:
2742: hr_utility.set_location(' Leaving:'|| l_proc, 100);
2743: EXCEPTION
2738: hr_utility.trace('Assigned Responsibility: ' || 'US_GOV_HR_MANAGER');
2739: hr_utility.set_location(l_proc, 20);
2740: end if;
2741:
2742: hr_utility.set_location(' Leaving:'|| l_proc, 100);
2743: EXCEPTION
2744: when others then
2745: l_error_message := 'Error in ' || l_proc;
2746: hr_utility.trace(l_error_message || '-' || sqlerrm);
2742: hr_utility.set_location(' Leaving:'|| l_proc, 100);
2743: EXCEPTION
2744: when others then
2745: l_error_message := 'Error in ' || l_proc;
2746: hr_utility.trace(l_error_message || '-' || sqlerrm);
2747: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2748: hr_utility.raise_error;
2749:
2750: END assign_misc_responsibility;
2743: EXCEPTION
2744: when others then
2745: l_error_message := 'Error in ' || l_proc;
2746: hr_utility.trace(l_error_message || '-' || sqlerrm);
2747: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2748: hr_utility.raise_error;
2749:
2750: END assign_misc_responsibility;
2751:
2744: when others then
2745: l_error_message := 'Error in ' || l_proc;
2746: hr_utility.trace(l_error_message || '-' || sqlerrm);
2747: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2748: hr_utility.raise_error;
2749:
2750: END assign_misc_responsibility;
2751:
2752: /* --------------------------------------------------------------------------
2767: l_proc varchar2(72) := g_package || 'return_config_entity_name';
2768: l_error_message varchar2(360);
2769:
2770: BEGIN
2771: hr_utility.set_location('Entering:'|| l_proc, 10);
2772: hr_utility.trace('per_ri_config_utilities.g_enterprise_short_name = ' || per_ri_config_utilities.g_enterprise_short_name );
2773: l_multiple_config_upload := fnd_profile.value('PER_RI_LOAD_OVERRIDE');
2774:
2775: if l_multiple_config_upload = 'Y' then
2768: l_error_message varchar2(360);
2769:
2770: BEGIN
2771: hr_utility.set_location('Entering:'|| l_proc, 10);
2772: hr_utility.trace('per_ri_config_utilities.g_enterprise_short_name = ' || per_ri_config_utilities.g_enterprise_short_name );
2773: l_multiple_config_upload := fnd_profile.value('PER_RI_LOAD_OVERRIDE');
2774:
2775: if l_multiple_config_upload = 'Y' then
2776: l_entity_name := entity_name || ' ' || per_ri_config_utilities.g_enterprise_short_name;
2777: else
2778: l_entity_name := entity_name;
2779: end if;
2780:
2781: --hr_utility.set_location(' Leaving:'|| l_proc, 30);
2782:
2783: return l_entity_name;
2784:
2785: EXCEPTION
2784:
2785: EXCEPTION
2786: when others then
2787: l_error_message := 'Error in ' || l_proc;
2788: hr_utility.trace(l_error_message || '-' || sqlerrm);
2789: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2790: hr_utility.raise_error;
2791:
2792: END return_config_entity_name;
2785: EXCEPTION
2786: when others then
2787: l_error_message := 'Error in ' || l_proc;
2788: hr_utility.trace(l_error_message || '-' || sqlerrm);
2789: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2790: hr_utility.raise_error;
2791:
2792: END return_config_entity_name;
2793:
2786: when others then
2787: l_error_message := 'Error in ' || l_proc;
2788: hr_utility.trace(l_error_message || '-' || sqlerrm);
2789: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2790: hr_utility.raise_error;
2791:
2792: END return_config_entity_name;
2793:
2794:
2810: l_proc varchar2(72) := g_package || 'return_config_entity_name_pre';
2811: l_error_message varchar2(360);
2812:
2813: BEGIN
2814: hr_utility.set_location('Entering:'|| l_proc, 10);
2815: hr_utility.trace('per_ri_config_utilities.g_enterprise_short_name = ' || per_ri_config_utilities.g_enterprise_short_name );
2816:
2817: l_multiple_config_upload := fnd_profile.value('PER_RI_LOAD_OVERRIDE');
2818:
2811: l_error_message varchar2(360);
2812:
2813: BEGIN
2814: hr_utility.set_location('Entering:'|| l_proc, 10);
2815: hr_utility.trace('per_ri_config_utilities.g_enterprise_short_name = ' || per_ri_config_utilities.g_enterprise_short_name );
2816:
2817: l_multiple_config_upload := fnd_profile.value('PER_RI_LOAD_OVERRIDE');
2818:
2819: if l_multiple_config_upload = 'Y' then
2821: else
2822: l_entity_name := entity_name;
2823: end if;
2824:
2825: --hr_utility.set_location(' Leaving:'|| l_proc, 30);
2826:
2827: return l_entity_name;
2828:
2829: EXCEPTION
2828:
2829: EXCEPTION
2830: when others then
2831: l_error_message := 'Error in ' || l_proc;
2832: hr_utility.trace(l_error_message || '-' || sqlerrm);
2833: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2834: hr_utility.raise_error;
2835:
2836: END return_config_entity_name_pre;
2829: EXCEPTION
2830: when others then
2831: l_error_message := 'Error in ' || l_proc;
2832: hr_utility.trace(l_error_message || '-' || sqlerrm);
2833: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2834: hr_utility.raise_error;
2835:
2836: END return_config_entity_name_pre;
2837:
2830: when others then
2831: l_error_message := 'Error in ' || l_proc;
2832: hr_utility.trace(l_error_message || '-' || sqlerrm);
2833: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2834: hr_utility.raise_error;
2835:
2836: END return_config_entity_name_pre;
2837:
2838: FUNCTION get_location_prompt(p_style in varchar2
2850: and descriptive_flex_context_code = cp_style
2851: and application_column_name = cp_app_col_name;
2852:
2853: BEGIN
2854: hr_utility.set_location(' Entering :'|| l_proc, 30);
2855: hr_utility.set_location(' Style :'|| p_style,40);
2856:
2857: open csr_get_prm(p_style,p_app_column_name);
2858:
2851: and application_column_name = cp_app_col_name;
2852:
2853: BEGIN
2854: hr_utility.set_location(' Entering :'|| l_proc, 30);
2855: hr_utility.set_location(' Style :'|| p_style,40);
2856:
2857: open csr_get_prm(p_style,p_app_column_name);
2858:
2859: fetch csr_get_prm into l_user_column_name;
2857: open csr_get_prm(p_style,p_app_column_name);
2858:
2859: fetch csr_get_prm into l_user_column_name;
2860: if(csr_get_prm%FOUND) then
2861: --hr_utility.set_location(' Leaving :'|| l_proc, 50);
2862: close csr_get_prm;
2863: return l_user_column_name;
2864: else
2865: --hr_utility.set_location(' Leaving :'|| l_proc, 50);
2861: --hr_utility.set_location(' Leaving :'|| l_proc, 50);
2862: close csr_get_prm;
2863: return l_user_column_name;
2864: else
2865: --hr_utility.set_location(' Leaving :'|| l_proc, 50);
2866: close csr_get_prm;
2867: return null;
2868: end if;
2869:
2911: l_valueset_name fnd_flex_value_sets.flex_value_set_name%type;
2912:
2913: BEGIN
2914:
2915: hr_utility.set_location('Entering:'|| l_proc, 10);
2916:
2917: if p_fed_seg_attribute = 'N' then
2918: --
2919: -- create flex segment value set
2923:
2924: l_valueset_name := p_structure_code || ' ' || p_segment_name
2925: || ' ' || l_valueset_seq;
2926:
2927: hr_utility.trace('l_valueset_name = ' || l_valueset_name);
2928: end if;
2929:
2930: -- valueset name is always passed when p_fed_seg_attribute = 'Y'
2931: if p_fed_seg_attribute = 'Y' then
2956: l_description := 'This value set is generated by Enterprise Structures Configuration '
2957: || 'This will initially be empty and can '
2958: || 'be populated using the load reference data';
2959:
2960: hr_utility.set_location(l_proc, 20);
2961: p_valueset_tab(l_value_set_count).value_set_name := l_valueset_name;
2962: p_valueset_tab(l_value_set_count).description := l_description;
2963: p_valueset_tab(l_value_set_count).security_available := l_security_available;
2964: p_valueset_tab(l_value_set_count).enable_longlist := l_enable_longlist;
2974: l_value_set_count := l_value_set_count + 1;
2975:
2976: l_log_message := 'Created VALUESET ' || p_valueset_name;
2977:
2978: hr_utility.set_location(' Leaving:'|| l_proc, 30);
2979:
2980: EXCEPTION
2981: when others then
2982: l_error_message := 'Error in ' || l_proc;
2979:
2980: EXCEPTION
2981: when others then
2982: l_error_message := 'Error in ' || l_proc;
2983: hr_utility.trace(l_error_message || '-' || sqlerrm);
2984: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2985: hr_utility.raise_error;
2986:
2987: End create_valueset_ts_data;
2980: EXCEPTION
2981: when others then
2982: l_error_message := 'Error in ' || l_proc;
2983: hr_utility.trace(l_error_message || '-' || sqlerrm);
2984: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2985: hr_utility.raise_error;
2986:
2987: End create_valueset_ts_data;
2988:
2981: when others then
2982: l_error_message := 'Error in ' || l_proc;
2983: hr_utility.trace(l_error_message || '-' || sqlerrm);
2984: hr_utility.set_location(' Leaving:'|| l_proc, 500);
2985: hr_utility.raise_error;
2986:
2987: End create_valueset_ts_data;
2988:
2989: /* --------------------------------------------------------------------------
3025: l_hrms_resp_one_tab per_ri_config_tech_summary.hrms_resp_tab;
3026:
3027: BEGIN
3028:
3029: hr_utility.set_location('Entering:'|| l_proc, 10);
3030:
3031: l_main_bgsgut_profile_resp_ct := 0;
3032: if p_security_profile_tab.count > 0 then
3033: for i in p_security_profile_tab.first ..
3035:
3036: l_security_profile_name := p_security_profile_tab(i).security_profile_name;
3037: l_responsibility_key := p_security_profile_tab(i).responsibility_key;
3038:
3039: hr_utility.trace('l_security_profile_name := ' || l_security_profile_name);
3040: hr_utility.trace('l_responsibility_key := ' || l_responsibility_key);
3041: hr_utility.trace('before loop l_more_profile_resp_tab_count ' || l_more_profile_resp_tab_count );
3042: per_ri_config_utilities.create_resp_and_profile
3043: (p_configuration_code => p_configuration_code
3036: l_security_profile_name := p_security_profile_tab(i).security_profile_name;
3037: l_responsibility_key := p_security_profile_tab(i).responsibility_key;
3038:
3039: hr_utility.trace('l_security_profile_name := ' || l_security_profile_name);
3040: hr_utility.trace('l_responsibility_key := ' || l_responsibility_key);
3041: hr_utility.trace('before loop l_more_profile_resp_tab_count ' || l_more_profile_resp_tab_count );
3042: per_ri_config_utilities.create_resp_and_profile
3043: (p_configuration_code => p_configuration_code
3044: ,p_security_profile_name => l_security_profile_name
3037: l_responsibility_key := p_security_profile_tab(i).responsibility_key;
3038:
3039: hr_utility.trace('l_security_profile_name := ' || l_security_profile_name);
3040: hr_utility.trace('l_responsibility_key := ' || l_responsibility_key);
3041: hr_utility.trace('before loop l_more_profile_resp_tab_count ' || l_more_profile_resp_tab_count );
3042: per_ri_config_utilities.create_resp_and_profile
3043: (p_configuration_code => p_configuration_code
3044: ,p_security_profile_name => l_security_profile_name
3045: ,p_responsibility_key => l_responsibility_key
3069: if l_main_bgsgut_profile_resp_tab.count > 0 THEN
3070: for j in l_main_bgsgut_profile_resp_tab.first ..
3071: l_main_bgsgut_profile_resp_tab.last loop
3072:
3073: hr_utility.trace('l_more_profile_resp_tab_count ' || l_more_profile_resp_tab_count );
3074:
3075: if l_main_bgsgut_profile_resp_tab(j).profile_name = 'PER_BUSINESS_GROUP_ID' then
3076: p_more_profile_resp_tab(l_more_profile_resp_tab_count).level
3077: := l_main_bgsgut_profile_resp_tab(j).level;
3132: end loop;
3133: end if;
3134:
3135: -- Process International BGs responsibilities
3136: hr_utility.set_location(l_proc, 20);
3137: l_int_bgsgut_profile_resp_ct := 0;
3138: if p_int_bg_resp_tab.count > 0 then
3139: for i in p_int_bg_resp_tab.first ..
3140: p_int_bg_resp_tab.last LOOP
3143: -- l_responsibility_key is null at this point
3144: l_responsibility_key := p_int_bg_resp_tab(i).responsibility_key;
3145:
3146:
3147: hr_utility.trace('l_security_profile_name ' || l_security_profile_name);
3148:
3149: if l_security_profile_name like '%INT BG' then
3150:
3151: -- all International BG's to get copy of GLB_SHRMS_MANAGER responsibility
3245: end if;
3246: end loop;
3247: end if;
3248:
3249: hr_utility.set_location(' Leaving:'|| l_proc, 100);
3250: EXCEPTION
3251: when others then
3252: l_error_message := 'Error in ' || l_proc;
3253: hr_utility.trace(l_error_message || '-' || sqlerrm);
3249: hr_utility.set_location(' Leaving:'|| l_proc, 100);
3250: EXCEPTION
3251: when others then
3252: l_error_message := 'Error in ' || l_proc;
3253: hr_utility.trace(l_error_message || '-' || sqlerrm);
3254: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3255:
3256:
3257: END create_more_hrms_resps;
3250: EXCEPTION
3251: when others then
3252: l_error_message := 'Error in ' || l_proc;
3253: hr_utility.trace(l_error_message || '-' || sqlerrm);
3254: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3255:
3256:
3257: END create_more_hrms_resps;
3258:
3286: l_proc varchar2(72) := g_package || 'create_responsibility';
3287: l_error_message varchar2(360);
3288:
3289: BEGIN
3290: hr_utility.set_location('Entering:'|| l_proc, 10);
3291:
3292: hr_utility.trace('x_responsibility_name := ' || p_responsibility_name);
3293: hr_utility.trace('x_resp_key := ' || p_resp_key);
3294:
3288:
3289: BEGIN
3290: hr_utility.set_location('Entering:'|| l_proc, 10);
3291:
3292: hr_utility.trace('x_responsibility_name := ' || p_responsibility_name);
3293: hr_utility.trace('x_resp_key := ' || p_resp_key);
3294:
3295: -- create responsibility only when if specified resposibility does not exists
3296: -- this case would happen when loader program is running into non-multiple configuration
3289: BEGIN
3290: hr_utility.set_location('Entering:'|| l_proc, 10);
3291:
3292: hr_utility.trace('x_responsibility_name := ' || p_responsibility_name);
3293: hr_utility.trace('x_resp_key := ' || p_resp_key);
3294:
3295: -- create responsibility only when if specified resposibility does not exists
3296: -- this case would happen when loader program is running into non-multiple configuration
3297: -- load mode.
3314: ,x_web_host_name => p_web_host_name
3315: ,x_web_agent_name => p_web_agent_name);
3316: end if;
3317:
3318: hr_utility.set_location(' Leaving:'|| l_proc, 100);
3319:
3320: EXCEPTION
3321: when others then
3322: l_error_message := 'Error in ' || l_proc;
3319:
3320: EXCEPTION
3321: when others then
3322: l_error_message := 'Error in ' || l_proc;
3323: hr_utility.trace(l_error_message || '-' || sqlerrm);
3324: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3325: hr_utility.raise_error;
3326:
3327: END create_responsibility;
3320: EXCEPTION
3321: when others then
3322: l_error_message := 'Error in ' || l_proc;
3323: hr_utility.trace(l_error_message || '-' || sqlerrm);
3324: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3325: hr_utility.raise_error;
3326:
3327: END create_responsibility;
3328:
3321: when others then
3322: l_error_message := 'Error in ' || l_proc;
3323: hr_utility.trace(l_error_message || '-' || sqlerrm);
3324: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3325: hr_utility.raise_error;
3326:
3327: END create_responsibility;
3328:
3329: /* --------------------------------------------------------------------------
3477: l_end_date varchar2(240) := to_char(per_ri_config_utilities.g_config_effective_end_date,'YYYY/MM/DD');
3478:
3479: BEGIN
3480:
3481: hr_utility.set_location('Entering:'|| l_proc, 10);
3482:
3483: if NOT (p_technical_summary_mode) then
3484: open csr_user;
3485: fetch csr_user into l_user_name;
3487:
3488: l_security_profile_name := p_security_profile_name;
3489: l_responsibility_key := p_responsibility_key;
3490:
3491: hr_utility.trace('l_security_profile_name := ' || l_security_profile_name);
3492: hr_utility.trace('l_responsibility_key := ' || l_responsibility_key);
3493:
3494: open csr_business_group(l_security_profile_name);
3495: fetch csr_business_group into l_security_group_id;
3488: l_security_profile_name := p_security_profile_name;
3489: l_responsibility_key := p_responsibility_key;
3490:
3491: hr_utility.trace('l_security_profile_name := ' || l_security_profile_name);
3492: hr_utility.trace('l_responsibility_key := ' || l_responsibility_key);
3493:
3494: open csr_business_group(l_security_profile_name);
3495: fetch csr_business_group into l_security_group_id;
3496: close csr_business_group;
3498: open csr_security_profiles(l_security_profile_name);
3499: fetch csr_security_profiles into l_security_profile_id;
3500: close csr_security_profiles;
3501:
3502: hr_utility.trace('l_security_profile_id := ' || l_security_profile_id);
3503:
3504: open csr_responsibility(l_responsibility_key);
3505: fetch csr_responsibility into l_responsibility_application_i,l_responsibility_id;
3506: close csr_responsibility;
3503:
3504: open csr_responsibility(l_responsibility_key);
3505: fetch csr_responsibility into l_responsibility_application_i,l_responsibility_id;
3506: close csr_responsibility;
3507: hr_utility.trace('l_responsibility_key := ' || l_responsibility_key);
3508:
3509: open csr_application(l_responsibility_application_i);
3510: fetch csr_application into l_application_short_name;
3511: close csr_application;
3508:
3509: open csr_application(l_responsibility_application_i);
3510: fetch csr_application into l_application_short_name;
3511: close csr_application;
3512: hr_utility.trace('l_application_short_name := ' || l_application_short_name);
3513:
3514: open csr_security_group_name(l_security_group_id);
3515: fetch csr_security_group_name into l_security_group_name, l_security_group_key;
3516: close csr_security_group_name;
3514: open csr_security_group_name(l_security_group_id);
3515: fetch csr_security_group_name into l_security_group_name, l_security_group_key;
3516: close csr_security_group_name;
3517:
3518: hr_utility.trace('l_security_group_id := ' || l_security_group_id);
3519: hr_utility.trace('l_security_group_key := ' || l_security_group_key);
3520: hr_utility.trace('l_start_date := ' || l_start_date);
3521: hr_utility.trace('l_end_date := ' || l_end_date);
3522:
3515: fetch csr_security_group_name into l_security_group_name, l_security_group_key;
3516: close csr_security_group_name;
3517:
3518: hr_utility.trace('l_security_group_id := ' || l_security_group_id);
3519: hr_utility.trace('l_security_group_key := ' || l_security_group_key);
3520: hr_utility.trace('l_start_date := ' || l_start_date);
3521: hr_utility.trace('l_end_date := ' || l_end_date);
3522:
3523: -- Create a copy of the responsibility and assign it to user.
3516: close csr_security_group_name;
3517:
3518: hr_utility.trace('l_security_group_id := ' || l_security_group_id);
3519: hr_utility.trace('l_security_group_key := ' || l_security_group_key);
3520: hr_utility.trace('l_start_date := ' || l_start_date);
3521: hr_utility.trace('l_end_date := ' || l_end_date);
3522:
3523: -- Create a copy of the responsibility and assign it to user.
3524: -- we can not share responsibility level profile options for
3517:
3518: hr_utility.trace('l_security_group_id := ' || l_security_group_id);
3519: hr_utility.trace('l_security_group_key := ' || l_security_group_key);
3520: hr_utility.trace('l_start_date := ' || l_start_date);
3521: hr_utility.trace('l_end_date := ' || l_end_date);
3522:
3523: -- Create a copy of the responsibility and assign it to user.
3524: -- we can not share responsibility level profile options for
3525: -- different user.
3543: open csr_requests_groups(l_new_request_group_id);
3544: fetch csr_requests_groups into l_new_request_group_name, l_new_group_app_short_name;
3545: close csr_requests_groups;
3546:
3547: hr_utility.trace('l_new_request_group_name := ' || l_new_request_group_name);
3548:
3549: hr_utility.trace('l_new_app_short_name := ' || l_new_app_short_name);
3550: hr_utility.trace('l_new_data_group_id := ' || l_new_data_group_id);
3551:
3545: close csr_requests_groups;
3546:
3547: hr_utility.trace('l_new_request_group_name := ' || l_new_request_group_name);
3548:
3549: hr_utility.trace('l_new_app_short_name := ' || l_new_app_short_name);
3550: hr_utility.trace('l_new_data_group_id := ' || l_new_data_group_id);
3551:
3552: open csr_data_groups(l_new_data_group_id,l_new_app_short_name);
3553: fetch csr_data_groups into l_new_data_group_name, l_new_data_group_app_name;
3546:
3547: hr_utility.trace('l_new_request_group_name := ' || l_new_request_group_name);
3548:
3549: hr_utility.trace('l_new_app_short_name := ' || l_new_app_short_name);
3550: hr_utility.trace('l_new_data_group_id := ' || l_new_data_group_id);
3551:
3552: open csr_data_groups(l_new_data_group_id,l_new_app_short_name);
3553: fetch csr_data_groups into l_new_data_group_name, l_new_data_group_app_name;
3554: close csr_data_groups;
3555:
3556: l_new_responsibility_name := per_ri_config_utilities.return_config_entity_name(l_new_responsibility_name);
3557: l_new_resp_key := upper(per_ri_config_utilities.return_config_entity_name(l_new_resp_key)); -- Fix for bug 9706310
3558:
3559: hr_utility.trace('l_new_resp_key ' || l_new_resp_key);
3560: hr_utility.trace('l_new_responsibility_name ' || l_new_responsibility_name);
3561:
3562: -- Modify GLB key names to country specific keys
3563: if l_new_resp_key like 'GLB_%' then
3556: l_new_responsibility_name := per_ri_config_utilities.return_config_entity_name(l_new_responsibility_name);
3557: l_new_resp_key := upper(per_ri_config_utilities.return_config_entity_name(l_new_resp_key)); -- Fix for bug 9706310
3558:
3559: hr_utility.trace('l_new_resp_key ' || l_new_resp_key);
3560: hr_utility.trace('l_new_responsibility_name ' || l_new_responsibility_name);
3561:
3562: -- Modify GLB key names to country specific keys
3563: if l_new_resp_key like 'GLB_%' then
3564: -- extract legislation code
3571:
3572: -- this takes care of HR and HRMS resps
3573: if l_new_resp_key like 'GLOBAL%' then
3574: -- extract legislation code
3575: hr_utility.trace('in GLobal Resp');
3576: l_legilsation_code := substr(l_security_profile_name,length(l_security_profile_name)-4,2);
3577: l_new_resp_key := replace(l_new_resp_key,'GLOBAL',l_legilsation_code);
3578:
3579: --append legislation code
3608: x_start_date => l_start_date,
3609: x_end_date => l_end_date,
3610: x_description => 'Created by Enterprise Structure Configuration');
3611:
3612: hr_utility.trace('Assigned Responsibility: ' || l_new_resp_key || ' ' || l_security_group_name);
3613: hr_utility.set_location(l_proc, 40);
3614:
3615: per_ri_config_fnd_hr_entity.create_bg_id_and_sg_id_profile
3616: (p_configuration_code => p_configuration_code
3609: x_end_date => l_end_date,
3610: x_description => 'Created by Enterprise Structure Configuration');
3611:
3612: hr_utility.trace('Assigned Responsibility: ' || l_new_resp_key || ' ' || l_security_group_name);
3613: hr_utility.set_location(l_proc, 40);
3614:
3615: per_ri_config_fnd_hr_entity.create_bg_id_and_sg_id_profile
3616: (p_configuration_code => p_configuration_code
3617: ,p_responsibility_key => l_new_resp_key
3680: p_hrms_resp_one_tab(l_hrms_resp_one_count).start_date := l_start_date;
3681: p_hrms_resp_one_tab(l_hrms_resp_one_count).end_date := l_end_date;
3682: p_hrms_resp_one_tab(l_hrms_resp_one_count).description := per_ri_config_main.g_description_string;
3683: --
3684: hr_utility.set_location(' Leaving:'|| l_proc, 100);
3685: end if;
3686: EXCEPTION
3687: when others then
3688: l_error_message := 'Error in ' || l_proc;
3685: end if;
3686: EXCEPTION
3687: when others then
3688: l_error_message := 'Error in ' || l_proc;
3689: hr_utility.trace(l_error_message || '-' || sqlerrm);
3690: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3691:
3692: END create_resp_and_profile;
3693:
3686: EXCEPTION
3687: when others then
3688: l_error_message := 'Error in ' || l_proc;
3689: hr_utility.trace(l_error_message || '-' || sqlerrm);
3690: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3691:
3692: END create_resp_and_profile;
3693:
3694: /* --------------------------------------------------------------------------
3712: l_proc varchar2(72) := g_package || 'get_responsibility_name';
3713: l_error_message varchar2(360);
3714:
3715: BEGIN
3716: hr_utility.set_location('Entering:'|| l_proc, 10);
3717:
3718: open csr_responsibility_key(p_responsibility_key);
3719:
3720: fetch csr_responsibility_key into
3719:
3720: fetch csr_responsibility_key into
3721: l_responsibility_name;
3722: if csr_responsibility_key%NOTFOUND then
3723: hr_utility.trace('Responsibility not found');
3724: l_responsibility_name := p_responsibility_key;
3725: end if;
3726:
3727: close csr_responsibility_key;
3725: end if;
3726:
3727: close csr_responsibility_key;
3728:
3729: hr_utility.set_location(' Leaving:'|| l_proc, 30);
3730:
3731: return l_responsibility_name;
3732:
3733: EXCEPTION
3732:
3733: EXCEPTION
3734: when others then
3735: l_error_message := 'Error in ' || l_proc;
3736: hr_utility.trace(l_error_message || '-' || sqlerrm);
3737: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3738: hr_utility.raise_error;
3739:
3740: END get_responsibility_name;
3733: EXCEPTION
3734: when others then
3735: l_error_message := 'Error in ' || l_proc;
3736: hr_utility.trace(l_error_message || '-' || sqlerrm);
3737: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3738: hr_utility.raise_error;
3739:
3740: END get_responsibility_name;
3741:
3734: when others then
3735: l_error_message := 'Error in ' || l_proc;
3736: hr_utility.trace(l_error_message || '-' || sqlerrm);
3737: hr_utility.set_location(' Leaving:'|| l_proc, 500);
3738: hr_utility.raise_error;
3739:
3740: END get_responsibility_name;
3741:
3742: -------------------------------------------------------------------------------
3753: l_bg_name varchar2(50);
3754:
3755: BEGIN
3756:
3757: hr_utility.set_location('Entering get_business_group_name ' , 10);
3758:
3759: open bg_name;
3760: fetch bg_name into l_bg_name;
3761: close bg_name;