[Home] [Help]
PACKAGE BODY: APPS.PER_RI_CONFIG_FND_DEF_ENTITY
Source
1 PACKAGE BODY per_ri_config_fnd_def_entity AS
2 /* $Header: perricfd.pkb 120.5 2005/08/04 13:13 dgarg noship $ */
3
4 g_config_effective_date DATE := TRUNC(TO_DATE('1951/01/01', 'YYYY/MM/DD'));
5 g_config_effective_end_date DATE := TRUNC(TO_DATE('4712/12/31', 'YYYY/MM/DD'));
6 g_package varchar2(30) := 'per_ri_config_fnd_def_entity.';
7
8
9 /* --------------------------------------------------------------------------
10 -- Name : create_user
11 -- Purpose : This procedure creates super user for the enteprise structures
12 -- configuration which would have all the responsibilities
13 -- and profiles options assigned to it.
14 -- Arguments : None
15 --
16 -------------------------------------------------------------------------- */
17 PROCEDURE create_user (p_technical_summary_mode in boolean default FALSE
18 ,p_user_tab in out nocopy
19 per_ri_config_tech_summary.user_tab) IS
20
21 cursor csr_find_user (cp_user_name in varchar2) IS
22 select user_id
23 from fnd_user
24 where user_name = cp_user_name;
25
26 l_users_count number(10) := 0;
27 l_proc varchar2(72) := g_package ||'create_user';
28 l_log_message varchar2(360);
29 l_error_message varchar2(360);
30 l_user_id fnd_user.user_id%type;
31 l_user_name fnd_user.user_name%type;
32
33 BEGIN
34 hr_utility.set_location('Entering:'|| l_proc, 10);
35
36 l_user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
37 (per_ri_config_main.g_configuration_user_name));
38
39 hr_utility.trace('l_user_name = ' || l_user_name);
40 open csr_find_user(l_user_name);
41 fetch csr_find_user into l_user_id;
42
43 if NOT (p_technical_summary_mode) then
44 if csr_find_user%NOTFOUND then
45 fnd_user_pkg.createuser(
46 x_user_name => upper(per_ri_config_utilities.return_config_entity_name_pre
47 (per_ri_config_main.g_configuration_user_name)),
48
49 x_start_date => per_ri_config_fnd_def_entity.g_config_effective_date,
50 x_owner => 'CUST',
51 x_unencrypted_password => 'welcome' );
52
53 l_log_message := 'Created User ' || upper(per_ri_config_utilities.return_config_entity_name_pre
54 (per_ri_config_main.g_configuration_user_name));
55 per_ri_config_utilities.write_log(p_message => l_log_message);
56 hr_utility.set_location(l_proc, 20);
57 else
58 l_log_message := 'User Already Existing ';
59 per_ri_config_utilities.write_log(p_message => l_log_message);
60 hr_utility.set_location(l_proc, 30);
61 end if;
62 else
63 p_user_tab(l_users_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
64 (per_ri_config_main.g_configuration_user_name));
65 p_user_tab(l_users_count).start_date := per_ri_config_fnd_def_entity.g_config_effective_date;
66 p_user_tab(l_users_count).description := null;
67
68 l_users_count := l_users_count + 1;
69 end if;
70 close csr_find_user;
71
72 hr_utility.set_location(' Leaving:'|| l_proc, 40);
73 EXCEPTION
74 when others then
75 l_error_message := 'Error in ' || l_proc;
76 hr_utility.trace(l_error_message || '-' || sqlerrm);
77 hr_utility.set_location(' Leaving:'|| l_proc, 500);
78 hr_utility.raise_error;
79
80 END create_user;
81
82 /* --------------------------------------------------------------------------
83 -- Name : create_site_profile_options
84 -- Purpose : This procedure creates following site level profile options.
85 -- Arguments : p_configuration_code
86 --
87 -------------------------------------------------------------------------- */
88
89
90 PROCEDURE create_site_profile_options(p_configuration_code in varchar2
91 ,p_technical_summary_mode in boolean default FALSE
92 ,p_profile_tab in out nocopy
93 per_ri_config_tech_summary.profile_tab) IS
94
95 l_profile_count number(10) := 0;
96 l_proc varchar2(72) := g_package ||'create_site_profile_options';
97 l_log_message varchar2(360);
98 l_error_message varchar2(360);
99
100 BEGIN
101 hr_utility.set_location('Entering:'|| l_proc, 10);
102
103 --HR_CROSS_BUSINESS_GROUP
104 if NOT (p_technical_summary_mode) then
105 per_ri_config_utilities.set_profile_option_value
106 (p_level => 10001
107 ,p_level_value => 0
108 ,p_level_value_app => 'PER'
109 ,p_profile_name => 'HR_CROSS_BUSINESS_GROUP'
110 ,p_profile_option_value => 'Y');
111 else
112 p_profile_tab(l_profile_count).level := 1001;
113 p_profile_tab(l_profile_count).level_value := 0;
114 p_profile_tab(l_profile_count).level_value_app := 'PER';
115 p_profile_tab(l_profile_count).profile_name := 'HR_CROSS_BUSINESS_GROUP';
116 p_profile_tab(l_profile_count).profile_option_value := 'Y';
117
118 l_profile_count := l_profile_count + 1;
119
120 end if;
121
122 l_log_message := 'Created PROFILE_OPTION ' || 'HR_CROSS_BUSINESS_GROUP';
123 per_ri_config_utilities.write_log(p_message => l_log_message);
124 hr_utility.set_location(l_proc, 20);
125
126 /* DGARG - MSG Changes
127 if (per_ri_config_utilities.check_selected_product
128 (p_configuration_code => p_configuration_code
129 ,p_product_name => 'PER')) then
130 --ENABLE_SECURITY_GROUPS
131 if NOT (p_technical_summary_mode) then
132 per_ri_config_utilities.set_profile_option_value
133 (p_level => 10002
134 ,p_level_value => 'PER'
135 ,p_level_value_app => 'PER'
136 ,p_profile_name => 'ENABLE_SECURITY_GROUPS'
137 ,p_profile_option_value => 'Y');
138
139 else
140 p_profile_tab(l_profile_count).level := 1002;
141 p_profile_tab(l_profile_count).level_value := 'PER';
142 p_profile_tab(l_profile_count).level_value_app := 'PER';
143 p_profile_tab(l_profile_count).profile_name := 'ENABLE_SECURITY_GROUPS';
144 p_profile_tab(l_profile_count).profile_option_value := 'Y';
145
146 l_profile_count := l_profile_count + 1;
147
148 end if;
149 l_log_message := 'Created PROFILE_OPTION PER ' || 'ENABLE_SECURITY_GROUPS';
150 per_ri_config_utilities.write_log(p_message => l_log_message);
151 hr_utility.set_location(l_proc, 30);
152 end if;
153
154 if (per_ri_config_utilities.check_selected_product
155 (p_configuration_code => p_configuration_code
156 ,p_product_name => 'PAY')) then
157 --ENABLE_SECURITY_GROUPS
158 if NOT (p_technical_summary_mode) then
159 per_ri_config_utilities.set_profile_option_value
160 (p_level => 10002
161 ,p_level_value => 'PAY'
162 ,p_level_value_app => 'PAY'
163 ,p_profile_name => 'ENABLE_SECURITY_GROUPS'
164 ,p_profile_option_value => 'Y');
165
166 else
167 p_profile_tab(l_profile_count).level := 1002;
168 p_profile_tab(l_profile_count).level_value := 'PAY';
169 p_profile_tab(l_profile_count).level_value_app := 'PAY';
170 p_profile_tab(l_profile_count).profile_name := 'ENABLE_SECURITY_GROUPS';
171 p_profile_tab(l_profile_count).profile_option_value := 'Y';
172
173 l_profile_count := l_profile_count + 1;
174
175 end if;
176 l_log_message := 'Created PROFILE_OPTION PAY ' || 'ENABLE_SECURITY_GROUPS';
177 per_ri_config_utilities.write_log(p_message => l_log_message);
178 hr_utility.set_location(l_proc, 30);
179 end if;
180
181 if (per_ri_config_utilities.check_selected_product
182 (p_configuration_code => p_configuration_code
183 ,p_product_name => 'BEN')) then
184 --ENABLE_SECURITY_GROUPS
185 if NOT (p_technical_summary_mode) then
186 per_ri_config_utilities.set_profile_option_value
187 (p_level => 10002
188 ,p_level_value => 'BEN'
189 ,p_level_value_app => 'BEN'
190 ,p_profile_name => 'ENABLE_SECURITY_GROUPS'
191 ,p_profile_option_value => 'Y');
192
193 else
194 p_profile_tab(l_profile_count).level := 1002;
195 p_profile_tab(l_profile_count).level_value := 'BEN';
196 p_profile_tab(l_profile_count).level_value_app := 'BEN';
197 p_profile_tab(l_profile_count).profile_name := 'ENABLE_SECURITY_GROUPS';
198 p_profile_tab(l_profile_count).profile_option_value := 'Y';
199
200 l_profile_count := l_profile_count + 1;
201
202 end if;
203 l_log_message := 'Created PROFILE_OPTION BEN ' || 'ENABLE_SECURITY_GROUPS';
204 per_ri_config_utilities.write_log(p_message => l_log_message);
205 hr_utility.set_location(l_proc, 30);
206 end if;
207 ** */
208 --HR_SYNC_SINGLE_GL_ORG
209 if NOT (p_technical_summary_mode) then
210 per_ri_config_utilities.set_profile_option_value
211 (p_level => 10001
212 ,p_level_value => 0
213 ,p_level_value_app => 'PER'
214 ,p_profile_name => 'HR_SYNC_SINGLE_GL_ORG'
215 ,p_profile_option_value => 'Y');
216
217 else
218 p_profile_tab(l_profile_count).level := 1001;
219 p_profile_tab(l_profile_count).level_value := 0;
220 p_profile_tab(l_profile_count).level_value_app := 'PER';
221 p_profile_tab(l_profile_count).profile_name := 'HR_SYNC_SINGLE_GL_ORG';
222 p_profile_tab(l_profile_count).profile_option_value := 'Y';
223
224 l_profile_count := l_profile_count + 1;
225
226 end if;
227 l_log_message := 'Created PROFILE_OPTION ' || 'HR_SYNC_SINGLE_GL_ORG';
228 per_ri_config_utilities.write_log(p_message => l_log_message);
229 hr_utility.set_location(l_proc, 40);
230
231 --HR_GENERATE_GL_ORGS
232 if NOT (p_technical_summary_mode) then
233 per_ri_config_utilities.set_profile_option_value
234 (p_level => 10001
235 ,p_level_value => 0
236 ,p_level_value_app => 'PER'
237 ,p_profile_name => 'HR_GENERATE_GL_ORGS'
238 ,p_profile_option_value => 'CCHR');
239 else
240 p_profile_tab(l_profile_count).level := 1001;
241 p_profile_tab(l_profile_count).level_value := 0;
242 p_profile_tab(l_profile_count).level_value_app := 'PER';
246 l_profile_count := l_profile_count + 1;
243 p_profile_tab(l_profile_count).profile_name := 'HR_GENERATE_GL_ORGS';
244 p_profile_tab(l_profile_count).profile_option_value := 'CCHR';
245
247
248 end if;
249
250 l_log_message := 'Created PROFILE_OPTION ' || 'HR_GENERATE_GL_ORGS';
251 per_ri_config_utilities.write_log(p_message => l_log_message);
252 hr_utility.set_location(l_proc, 50);
253
254 --BIS_PRIMARY_RATE_TYPE
255 if NOT (p_technical_summary_mode) then
256 per_ri_config_utilities.set_profile_option_value
257 (p_level => 10001
258 ,p_level_value => 0
259 ,p_level_value_app => 'BIS'
260 ,p_profile_name => 'BIS_PRIMARY_RATE_TYPE'
261 ,p_profile_option_value => 'Corporate');
262 else
263 p_profile_tab(l_profile_count).level := 1001;
264 p_profile_tab(l_profile_count).level_value := 0;
265 p_profile_tab(l_profile_count).level_value_app := 'BIS';
266 p_profile_tab(l_profile_count).profile_name := 'BIS_PRIMARY_RATE_TYPE';
267 p_profile_tab(l_profile_count).profile_option_value := 'Corporate';
268
269 l_profile_count := l_profile_count + 1;
270
271 end if;
272
273 l_log_message := 'Created PROFILE_OPTION ' || 'BIS_PRIMARY_RATE_TYPE';
274 per_ri_config_utilities.write_log(p_message => l_log_message);
275 hr_utility.set_location(l_proc, 60);
276
277 --BIS_WORKFORCE_MEASUREMENT_TYPE
278 if NOT (p_technical_summary_mode) then
279 per_ri_config_utilities.set_profile_option_value
280 (p_level => 10001
281 ,p_level_value => 0
282 ,p_level_value_app => 'BIS'
283 ,p_profile_name => 'BIS_WORKFORCE_MEASUREMENT_TYPE'
284 ,p_profile_option_value => 'HEAD');
285 else
286 p_profile_tab(l_profile_count).level := 1001;
287 p_profile_tab(l_profile_count).level_value := 0;
288 p_profile_tab(l_profile_count).level_value_app := 'BIS';
289 p_profile_tab(l_profile_count).profile_name := 'BIS_WORKFORCE_MEASUREMENT_TYPE';
290 p_profile_tab(l_profile_count).profile_option_value := 'HEAD';
291
292 l_profile_count := l_profile_count + 1;
293
294 end if;
295
296 l_log_message := 'Created PROFILE_OPTION ' || 'BIS_WORKFORCE_MEASUREMENT_TYPE';
297 per_ri_config_utilities.write_log(p_message => l_log_message);
298 hr_utility.set_location(l_proc, 70);
299
300 if (per_ri_config_utilities.check_selected_product
301 (p_configuration_code => p_configuration_code
302 ,p_product_name => 'SSHR')) then
303 --HR_SELF_SERVICE_HR_LICENSED
304 if NOT (p_technical_summary_mode) then
305 per_ri_config_utilities.set_profile_option_value
306 (p_level => 10001
307 ,p_level_value => 0
308 ,p_level_value_app => 'PER'
309 ,p_profile_name => 'HR_SELF_SERVICE_HR_LICENSED'
310 ,p_profile_option_value => 'Y');
311 else
312 p_profile_tab(l_profile_count).level := 1001;
313 p_profile_tab(l_profile_count).level_value := 0;
314 p_profile_tab(l_profile_count).level_value_app := 'PER';
315 p_profile_tab(l_profile_count).profile_name := 'HR_SELF_SERVICE_HR_LICENSED';
316 p_profile_tab(l_profile_count).profile_option_value := 'Y';
317
318 l_profile_count := l_profile_count + 1;
319
320 end if;
321
322 l_log_message := 'Created PROFILE_OPTION ' || 'HR_SELF_SERVICE_HR_LICENSED';
323 per_ri_config_utilities.write_log(p_message => l_log_message);
324 hr_utility.set_location(l_proc, 80);
325 end if;
326
327 hr_utility.set_location(' Leaving:'|| l_proc, 90);
328
329 EXCEPTION
330 when others then
331 l_error_message := 'Error in ' || l_proc;
332 hr_utility.trace(l_error_message || '-' || sqlerrm);
333 hr_utility.set_location(' Leaving:'|| l_proc, 500);
334 hr_utility.raise_error;
335
336 END create_site_profile_options;
337
338 /* --------------------------------------------------------------------------
339 -- Name : attach_default_responsibility
340 -- Purpose : This procedure attaches default responsibilities to the super
341 -- user for the enteprise structures configuration.
342 -- and profiles options assigned to it.
343 -- Arguments : None
344 --
345 -------------------------------------------------------------------------- */
346 PROCEDURE attach_default_responsibility
347 (p_configuration_code in varchar2
348 ,p_technical_summary_mode in boolean default FALSE
349 ,p_resp_tab in out nocopy
350 per_ri_config_tech_summary.resp_tab) IS
351
352 l_resp_count number(10) := 0;
353 l_proc varchar2(72) := g_package ||'attach_default_responsibility';
354 l_log_message varchar2(360);
355 l_error_message varchar2(360);
356 l_user_id fnd_user.user_id%type;
357 l_start_date varchar2(240) := to_char(per_ri_config_fnd_def_entity.g_config_effective_date,'YYYY/MM/DD');
358 l_end_date varchar2(240)
359 := to_char(per_ri_config_fnd_def_entity.g_config_effective_end_date,'YYYY/MM/DD');
363 where configuration_code = cp_configuration_code;
360 cursor csr_get_product (cp_configuration_code in varchar2) IS
361 select product_name
362 from per_ri_config_prod_selection_v
364
365 l_hr boolean default FALSE;
366 l_hrms boolean default FALSE;
367 l_benefits boolean default FALSE;
368 l_self_service boolean default FALSE;
369
370 l_product_name per_ri_config_information.config_information1%type;
371 BEGIN
372 hr_utility.set_location('Entering:'|| l_proc, 10);
373
374 if NOT (p_technical_summary_mode) then
375 -- Attach System Administrator
376 fnd_User_resp_groups_api.load_row(
377 x_user_name => upper(per_ri_config_utilities.return_config_entity_name_pre
378 (per_ri_config_main.g_configuration_user_name)),
379 x_resp_key => 'SYSTEM_ADMINISTRATOR',
380 x_app_short_name => 'SYSADMIN',
381 x_security_group => 'STANDARD',
382 x_owner => 'SEED',
383 x_start_date => l_start_date,
384 x_end_date => l_end_date,
385 x_description => per_ri_config_main.g_description_string);
386 else
387 p_resp_tab(l_resp_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
388 (per_ri_config_main.g_configuration_user_name));
389 p_resp_tab(l_resp_count).resp_key := per_ri_config_utilities.get_responsibility_name('SYSTEM_ADMINISTRATOR');
390 p_resp_tab(l_resp_count).app_short_name := 'SYSADMIN';
391 p_resp_tab(l_resp_count).security_group := 'STANDARD';
392 p_resp_tab(l_resp_count).owner := 'SEED';
393 p_resp_tab(l_resp_count).start_date := l_start_date;
394 p_resp_tab(l_resp_count).end_date := l_end_date;
395 p_resp_tab(l_resp_count).description := per_ri_config_main.g_description_string;
396
397 l_resp_count := l_resp_count + 1 ;
398 end if;
399
400 hr_utility.set_location(l_proc, 20);
401 l_log_message := 'Created RESPONSIBILITY ' || 'SYSTEM_ADMINISTRATOR';
402 per_ri_config_utilities.write_log(p_message => l_log_message);
403
404 -- Attach APPLICATION IMPLEMENTATION for iSetup
405 if NOT (p_technical_summary_mode) then
406 fnd_User_resp_groups_api.load_row(
407 x_user_name => upper(per_ri_config_utilities.return_config_entity_name_pre
408 (per_ri_config_main.g_configuration_user_name)),
409 x_resp_key => 'APPLICATION IMPLEMENTATION',
410 x_app_short_name => 'AZ',
411 x_security_group => 'STANDARD',
412 x_owner => 'SEED',
413 x_start_date => l_start_date,
414 x_end_date => l_end_date,
415 x_description => per_ri_config_main.g_description_string);
416 else
417 p_resp_tab(l_resp_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
418 (per_ri_config_main.g_configuration_user_name));
419 p_resp_tab(l_resp_count).resp_key := per_ri_config_utilities.get_responsibility_name('APPLICATION IMPLEMENTATION');
420 p_resp_tab(l_resp_count).app_short_name := 'AZ';
421 p_resp_tab(l_resp_count).security_group := 'STANDARD';
422 p_resp_tab(l_resp_count).owner := 'SEED';
423 p_resp_tab(l_resp_count).start_date := l_start_date;
424 p_resp_tab(l_resp_count).end_date := l_end_date;
425 p_resp_tab(l_resp_count).description := per_ri_config_main.g_description_string;
426
427 l_resp_count := l_resp_count + 1 ;
428
429 end if;
430 hr_utility.set_location(l_proc, 40);
431 l_log_message := 'Created RESPONSIBILITY ' || 'APPLICATION IMPLEMENTATION';
432 per_ri_config_utilities.write_log(p_message => l_log_message);
433
434 -- Attach FNDWF_USER_WEB_NEW for Payroll Process Workflow process
435 -- Bugfix 4219794
436 if NOT (p_technical_summary_mode) then
437 fnd_User_resp_groups_api.load_row(
438 x_user_name => upper(per_ri_config_utilities.return_config_entity_name_pre
439 (per_ri_config_main.g_configuration_user_name)),
440 x_resp_key => 'FNDWF_USER_WEB_NEW',
441 x_app_short_name => 'FND',
442 x_security_group => 'STANDARD',
443 x_owner => 'SEED',
444 x_start_date => l_start_date,
445 x_end_date => l_end_date,
446 x_description => per_ri_config_main.g_description_string);
447 else
448 p_resp_tab(l_resp_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
449 (per_ri_config_main.g_configuration_user_name));
450 p_resp_tab(l_resp_count).resp_key := per_ri_config_utilities.get_responsibility_name('FNDWF_USER_WEB_NEW');
451 p_resp_tab(l_resp_count).app_short_name := 'FND';
452 p_resp_tab(l_resp_count).security_group := 'STANDARD';
453 p_resp_tab(l_resp_count).owner := 'SEED';
454 p_resp_tab(l_resp_count).start_date := l_start_date;
455 p_resp_tab(l_resp_count).end_date := l_end_date;
456 p_resp_tab(l_resp_count).description := per_ri_config_main.g_description_string;
457
461 hr_utility.set_location(l_proc, 40);
458 l_resp_count := l_resp_count + 1 ;
459
460 end if;
462 l_log_message := 'Created RESPONSIBILITY ' || 'FNDWF_USER_WEB_NEW';
463 per_ri_config_utilities.write_log(p_message => l_log_message);
464
465 -- Attach AZ_ISETUP
466 if NOT (p_technical_summary_mode) then
467 fnd_User_resp_groups_api.load_row(
468 x_user_name => upper(per_ri_config_utilities.return_config_entity_name_pre
469 (per_ri_config_main.g_configuration_user_name)),
470 x_resp_key => 'AZ_ISETUP',
471 x_app_short_name => 'AZ',
472 x_security_group => 'STANDARD',
473 x_owner => 'SEED',
474 x_start_date => l_start_date,
475 x_end_date => l_end_date,
476 x_description => per_ri_config_main.g_description_string);
477 else
478 p_resp_tab(l_resp_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
479 (per_ri_config_main.g_configuration_user_name));
480 p_resp_tab(l_resp_count).resp_key := per_ri_config_utilities.get_responsibility_name('AZ_ISETUP');
481 p_resp_tab(l_resp_count).app_short_name := 'AZ';
482 p_resp_tab(l_resp_count).security_group := 'STANDARD';
483 p_resp_tab(l_resp_count).owner := 'SEED';
484 p_resp_tab(l_resp_count).start_date := l_start_date;
485 p_resp_tab(l_resp_count).end_date := l_end_date;
486 p_resp_tab(l_resp_count).description := per_ri_config_main.g_description_string;
487
488 l_resp_count := l_resp_count + 1 ;
489
490 end if;
491 hr_utility.set_location(l_proc, 40);
492 l_log_message := 'Created RESPONSIBILITY ' || 'AZ_ISETUP';
493 per_ri_config_utilities.write_log(p_message => l_log_message);
494
495 -- Attach HRMS_RI_WORKBENCH
496 if NOT (p_technical_summary_mode) then
497 fnd_User_resp_groups_api.load_row(
498 x_user_name => upper(per_ri_config_utilities.return_config_entity_name_pre
499 (per_ri_config_main.g_configuration_user_name)),
500 x_resp_key => 'HRMS_RI_WORKBENCH',
501 x_app_short_name => 'PER',
502 x_security_group => 'STANDARD',
503 x_owner => 'SEED',
504 x_start_date => l_start_date,
505 x_end_date => l_end_date,
506 x_description => per_ri_config_main.g_description_string);
507 else
508 p_resp_tab(l_resp_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
509 (per_ri_config_main.g_configuration_user_name));
510 p_resp_tab(l_resp_count).resp_key := per_ri_config_utilities.get_responsibility_name('HRMS_RI_WORKBENCH');
511 p_resp_tab(l_resp_count).app_short_name := 'PER';
512 p_resp_tab(l_resp_count).security_group := 'STANDARD';
513 p_resp_tab(l_resp_count).owner := 'SEED';
514 p_resp_tab(l_resp_count).start_date := l_start_date;
515 p_resp_tab(l_resp_count).end_date := l_end_date;
516 p_resp_tab(l_resp_count).description := per_ri_config_main.g_description_string;
517
518 l_resp_count := l_resp_count + 1 ;
519
520 end if;
521 hr_utility.set_location(l_proc, 50);
522 l_log_message := 'Created RESPONSIBILITY ' || 'HRMS_RI_WORKBENCH';
523 per_ri_config_utilities.write_log(p_message => l_log_message);
524
525 hr_utility.set_location(' Leaving:'|| l_proc, 50);
526
527 -- create data for technical summary for self-service responsibilities
528 open csr_get_product(p_configuration_code);
529
530 loop
531 fetch csr_get_product into l_product_name;
532 exit when csr_get_product%NOTFOUND;
533 hr_utility.trace('l_product_name = ' || l_product_name);
534
535 if l_product_name = 'PER' then
536 l_hr := TRUE;
537 end if;
538 if l_product_name = 'PAY' then
539 l_hrms := TRUE;
540 end if;
541 if l_product_name = 'BEN' then
542 l_benefits := TRUE;
543 end if;
544 if l_product_name = 'SSHR' then
545 l_self_service := TRUE;
546 end if;
547 end loop;
548
549 close csr_get_product;
550
551 --
552 -- assign hrms self service responsibilities
553 --
554
555 if l_self_service and p_technical_summary_mode then
556
557 -- EMPLOYEE_DIRECT_ACCESS_V4
558 p_resp_tab(l_resp_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
559 (per_ri_config_main.g_configuration_user_name));
560 p_resp_tab(l_resp_count).resp_key := per_ri_config_utilities.get_responsibility_name('EMPLOYEE_DIRECT_ACCESS_V4.0');
561 p_resp_tab(l_resp_count).app_short_name := 'PER';
562 p_resp_tab(l_resp_count).security_group := 'STANDARD';
563 p_resp_tab(l_resp_count).owner := 'SEED';
564 p_resp_tab(l_resp_count).start_date := l_start_date;
565 p_resp_tab(l_resp_count).end_date := l_end_date;
566 p_resp_tab(l_resp_count).description := per_ri_config_main.g_description_string;
567
568 l_resp_count := l_resp_count + 1 ;
569
570 -- LINE_MANAGER_ACCESS_V4
571 p_resp_tab(l_resp_count).user_name := upper(per_ri_config_utilities.return_config_entity_name_pre
572 (per_ri_config_main.g_configuration_user_name));
573 p_resp_tab(l_resp_count).resp_key := per_ri_config_utilities.get_responsibility_name('LINE_MANAGER_ACCESS_V4.0');
574 p_resp_tab(l_resp_count).app_short_name := 'PER';
575 p_resp_tab(l_resp_count).security_group := 'STANDARD';
576 p_resp_tab(l_resp_count).owner := 'SEED';
577 p_resp_tab(l_resp_count).start_date := l_start_date;
578 p_resp_tab(l_resp_count).end_date := l_end_date;
579 p_resp_tab(l_resp_count).description := per_ri_config_main.g_description_string;
580
581 l_resp_count := l_resp_count + 1 ;
582 end if;
583
584 hr_utility.set_location(l_proc, 30);
585 EXCEPTION
586 when others then
587 l_error_message := 'Error in ' || l_proc;
588 hr_utility.trace(l_error_message || '-' || sqlerrm);
589 hr_utility.set_location(' Leaving:'|| l_proc, 500);
590 hr_utility.raise_error;
591
592 END attach_default_responsibility;
593
594 END per_ri_config_fnd_def_entity;