1 Package hr_user_acct_utility as
2 /* $Header: hrusracu.pkh 120.0 2005/05/31 03:39:56 appldev noship $ */
3 --
4 -- Public Global Variables
5 --
6 g_package varchar2(33) := 'hr_user_acct_utility.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- NOTE: This package specification contains global variables only. It does
10 -- not have any functions or procedures. The purpose of this specification
11 -- is to allow user hooks to communicate output information to the caller
12 -- api.
13 -- The starting index for all PL/SQL tables defined in this specification
14 -- is 1. So, use index = 1 as a start index when loading the tables.
15 -- ----------------------------------------------------------------------------
16 -- USAGE NOTES FOR CREATING A USER NAME:
17 -- user_name - required, cannot be more than 100 characters.
18 --
19 -- password - optional. If entered, the length cannot be more than the
20 -- length in SIGNON_PASSWORD_LENGTH profile option. If null
21 -- value, a randomly generated 8-byte alphanumeric string will be
22 -- generated.
23 --
24 -- start_date - optional. If null value, the employee's Hire Date will be
25 -- used.
26 --
27 -- end_date - optional. If entered, it must be greater than start_date.
28 --
29 -- email_address - optional. If entered, cannot be more than 240 characters.
30 --
31 -- fax - optional. If entered, cannot be more than 80 characters.
32 --
33 -- description - optional. If entered, cannot be more than 240 characters.
34 -- password_date - optional. If null, user have to change their password
35 -- after first login -- Fix 2288014
36 --
37 -- language - optional, default value is "AMERICAN". If entered, it must
38 -- be one of the valid values in fnd_languages.nls_language
39 -- column with the installed_flag = 'B' or 'I'.
40 --
41 -- host_port - unused. In R11.5, this field is no longer needed. The value
42 -- put in here will be ignored. The reason this field is left in
43 -- the record structure is to facilitate R11 users who have
44 -- upgraded to R11.5 without changing their user exit code.
45 --
46 -- employee_id - optional. If the user name is to associate to an employee,
47 -- then this field must contain a valid person_id in
48 -- per_all_people_f table.
49 --
50 -- customer_id - optional. No validation is done on this field. This field
51 -- is used by non Oracle Human Resources Application and this
52 -- program is intended for HR Application use only.
53 --
54 -- supplier_id - optional. No validation is done on this field. This field
55 -- is used by non Oracle Human Resources Application and this
56 -- program is intended for HR Application use only.
57 -------------------------------------------------------------------------------
58 --
59 --
60 -- RECORD STRUCTURE FOR FND_USERS
61 -- ==============================
62 TYPE fnd_user_rec IS RECORD
63 (user_name fnd_user.user_name%type
64 ,password varchar2(30)
65 ,start_date fnd_user.start_date%type
66 ,end_date fnd_user.end_date%type
67 ,email_address fnd_user.email_address%type
68 ,fax fnd_user.fax%type
69 ,description fnd_user.description%type
70 ,password_date fnd_user.password_date%type
71 ,language fnd_profile_option_values.profile_option_value%type
72 ,host_port varchar2(2000)
73 ,employee_id fnd_user.employee_id%type
74 ,customer_id fnd_user.customer_id%type
75 ,supplier_id fnd_user.supplier_id%type
76 );
77 --
78 g_fnd_user_rec fnd_user_rec;
79 --
80 -- ----------------------------------------------------------------------------
81 -- NOTE: Since new responsibility can use a template responsibility's
82 -- values, we need to use API constant system defaults to differentiate
83 -- null value as opposed to use the template value.
84 -- Use the following values to indicate to use the template
85 -- responsibility's value:
86 -- 1) hr_api.g_varchar2 -> means to use the template responsibility's
87 -- value for varchar2 data type field.
88 -- 2) hr_api.g_number -> means to use the template responsibility's
89 -- value for number data type field.
90 -- 3) hr_api.g_date -> means to use the template responsibility's
91 -- value for date data type field.
92 -- For null values, enter null in the approperiate field.
93 --
94 -- ----------------------------------------------------------------------------
95 --
96 -- ----------------------------------------------------------------------------
97 -- USAGE NOTES FOR CREATING/UPDATING A RESPONSIBILTY, ASSOCIATING A
98 -- RESPONSIBILITY, SECURITY GROUP TO A USERNAME:
99 --
100 -- ***************************************************************************
101 -- For R11i, fnd_user_responsibility is replaced with fnd_user_resp_groups.
102 -- If the profile option 'ENABLE_SECURITY_GROUPS' for the Application is 'Y',
103 -- then you'll need to populate the sec_group_id, sec_profile_id fields at the
104 -- end of this record structure. The system will insert a row into
105 -- per_sec_profile_assignments as well as to fnd_user_resp_groups.
106 --
107 -- If the profile option 'ENABLE_SECURITY_GROUPS' for the Application is 'N',
108 -- that means you remain to use the R11 way of responsibility and security profile
109 -- set up. There is no need to fill in the values of sec_group_id and
110 -- sec_profile_id fields. The system will insert a row into fnd_user_resp_groups
111 -- only.
112 -- ***************************************************************************
113 --
114 -- existing_resp_id - optional. If creating a new responsibility and would
115 -- want to use an existing responsibility as a template,
116 -- or to associate the new user name to an existing
117 -- responsibililty, then fill in this field with
118 -- the fnd_responsibility.responsibility_id value.
119 -- If no template is to be used, leave this field null.
120 --
121 -- existing_resp_key - optional. If creating a new responsibility and would
122 -- want to use an existing responsibility as a template,
123 -- or to associate the new user name to an existing
124 -- responsibililty, then fill in this field with
125 -- the fnd_responsibility.responsibility_key value.
126 -- If no template is to be used, leave this field null.
127 --
128 -- existing_resp_app_id - optional. If creating a new responsibility and would
129 -- want to use an existing responsibility as a template,
130 -- or to associate the new user name to an existing
131 -- responsibililty, then fill in this field with
132 -- the fnd_responsibility.application_id value.
133 -- If no template is to be used, leave this field null.
134 -- the fnd_responsibility.responsibility_id value.
135 --
136 -- new_resp_name - mandatory only for creating a new responsibility. If
137 -- entered, cannot exceed the length of
138 -- fnd_responsibility_tl.responsibility_name, which is
139 -- 100 characters. If associating the new user name to
140 -- an existing responsibility, do not enter any value
141 -- in this field.
142 --
143 -- new_resp_key - mandatory only for creating a new responsibility. If
144 -- entered, cannot exceed the length of
145 -- fnd_responsibility.responsibility_key, which is
146 -- 30 characters. If associating the new user name to
147 -- an existing responsibility, do not enter any value
148 -- in this field.
149 --
150 -- new_resp_app_id - mandatory only for creating a new responsibility. If
151 -- entered, cannot exceed the length of
152 -- fnd_responsibility.application_id, which is a number type
153 -- with a size of 15. If associating the new user name to
154 -- an existing responsibility, do not enter any value
155 -- in this field.
156 --
157 -- new_resp_description - optional for creating a new responsibility. If
158 -- entered, cannot exceed the length of
159 -- fnd_responsibility_tl.description, which is 240
160 -- characters. If associating the new user name to
161 -- an existing responsibility, do not enter any value
162 -- in this field.
163 --
164 -- new_resp_start_date - mandatory only for creating a new responsibility. If
165 -- entered, it should be in date data type. If associating
166 -- the new user name to an existing responsibility, do not
167 -- enter any value in this field.
168 --
169 -- new_resp_end_date - optional for creating a new responsibility. If
170 -- entered, it should be in date data type and must be
171 -- larger than or equal to new_resp_start_date. If
172 -- associating the new user name to an existing
173 -- responsibility, do not enter any value in this field.
174
175 -- new_resp_data_group_name - mandatory only for creating a new responsibility.
176 -- Length cannot exceed the length of
177 -- fnd_data_groups.data_group_name, which is 30 characters.
178 -- If associating the new user name to an existing
179 -- responsibility, do not enter any value in this field.
180 --
181 -- new_resp_data_grp_app_id - mandatory only for creating a new responsibility.
182 -- Length cannot exceed the length of
183 -- fnd_responsibility.data_group_application_id, which is
184 -- a number data type with a size of 15.
185 -- If associating the new user name to an existing
186 -- responsibility, do not enter any value in this field.
187 --
188 -- new_resp_menu_name - mandatory only for creating a new responsibility.
189 -- Length cannot exceed the length of
190 -- fnd_menus.menu_name, which is the internal name for a
191 -- menu with a size of 30 characters.
192 -- If associating the new user name to an existing
193 -- responsibility, do not enter any value in this field.
194 --
195 -- new_resp_request_group_name - optional for creating a new responsibility.
196 -- If entered, cannot exceed the length of
197 -- fnd_request_groups.request_group_name, which is
198 -- 30 characters.
199 -- If associating the new user name to an existing
200 -- responsibility, do not enter any value in this field.
201 --
202 -- new_resp_req_grp_app_id - optional for creating a new responsibility.
203 -- If entered, cannot exceed the length of
204 -- fnd_request_groups.application_id, which is a number
205 -- data type with a size of 15.
206 -- If associating the new user name to an existing
207 -- responsibility, do not enter any value in this field.
208 --
209 -- new_resp_version - optional for creating a new responsibility.
210 -- If entered, cannot exceed the length of
211 -- fnd_responsibility.version, which is 1 character with
212 -- the following valid values:
213 -- '4' = Oracle Applications, ie. Forms
214 -- 'W' = Oracle Self Service Web Applications.
215 -- If associating the new user name to an existing
216 -- responsibility, do not enter any value in this field.
217 --
218 -- new_resp_web_host_name - optional for creating a new responsibility.
219 -- If entered, this field will supercede the APPS_WEB_AGENT
220 -- profile option value.
221 -- Under normal circumstances, this field should NOT be
222 -- used even for creating a new responsibility.
223 -- If associating the new user name to an existing
224 -- responsibility, do not enter any value in this field.
225 --
226 -- new_resp_web_agent_name - optional for creating a new responsibility.
227 -- If entered, this field will supercede the APPS_WEB_AGENT
228 -- profile option value.
229 -- Under normal circumstances, this field should NOT be
230 -- used even for creating a new responsibility.
231 -- If associating the new user name to an existing
232 -- responsibility, do not enter any value in this field.
233 --
234 -- user_resp_start_date - mandatory for associating the above responsibility to
235 -- the new user. It should be in date data type.
236 -- Length cannot exceed the length of
237 -- fnd_user_resp_groups.start_date.
238 -- Do not fill in this field with a hr_api.g_date
239 -- because each user should have his/her own start_date.
240 --
241 -- user_resp_end_date - optional for associating the above responsibility to
242 -- the new user. It should be in date data type and must be
243 -- larger than or equal to user_resp_start_date.
244 -- Length can not exceed the length of
245 -- fnd_user_resp_groups.end_date.
246 -- Do not fill in this field with a hr_api.g_date
247 -- because each user should have his/her own end_date.
248 -- If no end_date is aniticpated, set this field to null.
249 --
250 -- user_resp_description - optional for associating the responsibility to the
251 -- new user. Length cannot exceed the length of
252 -- fnd_user_resp_groups.description.
253 -- Do not fill in this field with a hr_api.g_varchar2
254 -- because each user should have his/her own description.
255 --
259 -- **** an existing responsibility (if existing_resp_id is not null and
256 -- **** The following two fields sec_group_id and sec_profile_id
257 -- **** are to be populated only if the 'ENABLE_SECURITY_GROUPS' profile
258 -- **** option is 'Y'. Filling these two fields means associating
260 -- **** new_resp_key is null) or a new responsibility (if existing_resp_id is
261 -- **** not null and new_resp_key is not null OR existing_resp_id is null
262 -- **** and new_resp_key is NOT null) to the new user using the sec_group_id
263 -- **** and the sec_profile_id entered. However, you have an option to leave
264 -- **** these two fields to null if you want to use the view-all security
265 -- **** profile of the employee's business group. In this case, only
266 -- **** fnd_user_resp_groups will be populated but not
267 -- **** per_security_profile_assignment.
268 -- **** If 'ENABLE_SECURITY_GROUPS' = 'N', ignore these two fields.
269 --
270 -- sec_group_id - optional for 'ENABLE_SECURITY_GROUPS' profile option =
271 -- 'Y'. Length cannot exceed
272 -- per_sec_profile_assignments.security_group_id, which is
273 -- a number data type. It must be a valid value in
274 -- fnd_security_groups.security_group_id.
275 -- Do not fill in this field with a hr_api.g_number
276 -- because each user should use his/her own security group
277 -- id. If this field is null or sec_profile_id is null,
278 -- then the view-all security profile for the employee's
279 -- business group will be used. No row will be inserted
280 -- into per_security_profile_assignments. Only 1 row will
281 -- be inserted into fnd_user_resp_groups table.
282 -- If 'ENABLE_SECURITY_GROUPS' profile option = 'N', leave
283 -- this field null.
284 --
285 -- sec_profile_id - optional for 'ENABLE_SECURITY_GROUPS' profile option
286 -- = 'Y'. Length cannot exceed
287 -- per_sec_profile_assignments.security_profile_id, which is
288 -- a number data type. It must be a valid value in
289 -- per_security_profiles.security_profile_id.
290 -- Do not fill in this field with a hr_api.g_number
291 -- because each user should use his/her own security profile
292 -- id. If this field is null or sec_profile_id is null,
293 -- then the view-all security profile for the employee's
294 -- business group will be used. No row will be inserted
295 -- into per_security_profile_assignments. Only 1 row will
296 -- be inserted into fnd_user_resp_groups table.
297 -- If 'ENABLE_SECURITY_GROUPS' profile option = 'N', leave
298 -- this field null.
299 --
300 -------------------------------------------------------------------------------
301 --
302 -- RECORD STRUCTURE FOR FND_RESPONSIBILITIES
303 -- =========================================
304 TYPE fnd_responsibility_rec IS RECORD
305 (existing_resp_id fnd_responsibility.responsibility_id%type
306 ,existing_resp_key fnd_responsibility.responsibility_key%type
307 ,existing_resp_app_id fnd_responsibility.application_id%type
308 ,new_resp_name fnd_responsibility_tl.responsibility_name%type
309 ,new_resp_key fnd_responsibility.responsibility_key%type
310 ,new_resp_app_id fnd_application.application_id%type
311 ,new_resp_description fnd_responsibility_tl.description%type
312 ,new_resp_start_date fnd_responsibility.start_date%type
313 ,new_resp_end_date fnd_responsibility.end_date%type
314 ,new_resp_data_group_name
315 fnd_data_groups_standard_view.data_group_name%type
316 ,new_resp_data_grp_app_id
317 fnd_responsibility.data_group_application_id%type
318 ,new_resp_menu_name fnd_menus.menu_name%type
319 ,new_resp_request_group_name fnd_request_groups.request_group_name%type
320 ,new_resp_req_grp_app_id fnd_application.application_id%type
321 ,new_resp_version fnd_responsibility.version%type
322 ,new_resp_web_host_name fnd_responsibility.web_host_name%type
323 ,new_resp_web_agent_name fnd_responsibility.web_agent_name%type
324 ,user_resp_start_date fnd_user_resp_groups.start_date%type
325 ,user_resp_end_date fnd_user_resp_groups.end_date%type
326 ,user_resp_description fnd_user_resp_groups.description%type
327 ,sec_group_id
328 per_sec_profile_assignments.security_group_id%type
329 ,sec_profile_id per_sec_profile_assignments.security_profile_id%type
330 );
331
332 TYPE fnd_responsibility_tbl IS TABLE OF fnd_responsibility_rec
333 INDEX BY BINARY_INTEGER;
334 --
335 -- USE INDEX = 1 TO START LOADING THE TABLE.
336 g_fnd_resp_tbl fnd_responsibility_tbl;
337
338 --
339 -- ----------------------------------------------------------------------------
340 -- USAGE NOTES FOR ASSOCIATING FUNCTION SECURITY EXCLUSION RULES TO A NEW
341 -- RESPONSIBILITY:
342 --
343 -- Function exclusions are to be entered only for new responsibilities
344 -- listed in g_fnd_resp_tbl above if function exclusion rules are to be
345 -- applied to the new responsbilities. For those new responsibilities
346 -- which do not use function exclusions, you don't need to fill in
347 -- a row in this g_fnd_resp_functions_tbl.
348 --
352 -- new responsibility, then this field can be filled in with
349 -- existing_resp_key - optional. If a new responsibility is based on a
350 -- template responsibility and the template responsibility's
351 -- function security exclusion rules are to be copied to the
353 -- an existing responsibility key in the database.
354 -- If entered, cannot exceed the length of
355 -- fnd_responsibility.responsibility_key, which is
356 -- 30 characters.
357 -- If you want to add a new function exclusion rule, you need
358 -- to create a new entry in this table with this field being
359 -- null.
360 --
361 -- new_resp_key - mandatory for a new responsibility listed in
362 -- g_fnd_resp_tbl above. Length cannot exceed the length
363 -- of fnd_responsibility.responsibility_key, which is
364 -- 30 characters.
365 --
366 -- rule_type - optional. If the function security exclusion rules of a
367 -- template responsibility are to be used, this field can be
368 -- left null unless you want to add new function exclusion
369 -- rules in addition to the template responsibility's
370 -- exclusion rules. If entered, cannot exceed
371 -- the length of fnd_resp_functions.rule_type, which is 1
372 -- character with the following valid values:
373 -- 'F' = Function
374 -- 'M' = Menu
375 --
376 -- rule_name - optional. If the function security exclusion rules of a
377 -- template responsibility are to be used, this field can be
378 -- left null unless you want to add new function exclusion
379 -- rules in addition to the template responsibility's
380 -- exclusion rules. If entered, cannot exceed
381 -- the length of either fnd_form_functions.function_name or
382 -- fnd_menus.menu_name, both are 30 characters each. The
383 -- valid values in this field are one of the following:
384 -- i) fnd_form_functions.function_name if rule_type = 'F'.
385 -- ii) fnd_menus.menu_name if rule_type = 'M'.
386 --
387 -- delete_flag - NOT USED. This field is for future use.
388 -- The default value is 'N'. This field is ignored in
389 -- the current delivery.
390 --
391 -- For example, if you cant to copy all the function exclusion rules from
392 -- "HR_LMDA_RESPONSIBILITY" (assuming the repsonsibility_key is the same)
393 -- to the new responsibility created in g_fnd_resp_tbl and you want to add
394 -- a new function exclusion rule to this new responsibility, then you will
395 -- fill out the following entries in this g_fnd_resp_functions_tbl array:
396 -- Entry Existing_Resp_Key New_Resp_key Rule Rule Delete
397 -- # Type Name Flag
398 -- ----- ----------------------- --------------- ----- ------------- ------
399 -- 1 HR_LMDA_RESPONSIBILITY <new resp key> null null null
400 -- 2 null <new resp key> F <func name> null
401 -- OR
402 -- 2 null <new resp key> M <menu name> null
403 --
404 -- ----------------------------------------------------------------------------
405 --
406 -- RECORD STRUCTURE FOR FND_RESP_FUNCTIONS:
407 -- =========================================
408 TYPE fnd_resp_functions_rec IS RECORD
409 (existing_resp_key fnd_responsibility.responsibility_key%type
410 ,new_resp_key fnd_responsibility.responsibility_key%type
411 ,rule_type fnd_resp_functions.rule_type%type
412 ,rule_name varchar2(30)
413 ,delete_flag varchar2(1));
414 --
415 TYPE fnd_resp_functions_tbl IS TABLE OF fnd_resp_functions_rec
416 INDEX BY BINARY_INTEGER;
417 --
418 -- USE INDEX = 1 TO START LOADING THE TABLE.
419 g_fnd_resp_functions_tbl fnd_resp_functions_tbl;
420 --
421 --
422 --
423 --------------------------------------------------------------------------------
424 -- USAGE NOTES FOR CREATING PROFILE OPTION VALUE AT THE RESPONSIBILITY OR USER
425 -- LEVEL:
426 --
427 --
428 -- 1) 'SITE' or 'APPL' level profile option values cannot be added because these
429 -- should have been set at the initial installation/implementation via online
430 -- entries to the form. The batch job is not intended to replace the online
431 -- form.
432 --
433 -- 2) This is intended to use for creating profile option values for a new
434 -- responsibility at the responsibility level or for a new user at the user
435 -- level. It is not intended to use for updating an existing profile option
436 -- value at responsibility or user level.
437 --
438 -- 3) For a new responsibility, three profile option values must be set in
439 -- order for the new responsibility to function correctly:
440 -- i) PER_BUSINESS_GROUP_ID \ Site level profile option value will
441 -- ii) PER_SECURITY_PROFILE_ID / be used if not set at the resp level
442 -- iii) HR_USER_TYPE
443 --
444 -- 4) It is assumed that various security profiles have already been created
445 -- before running the program so that a security profile can be set as a
446 -- a value in the profile option "PER_SECURITY_PROFILE_ID".
447
448 -- 5) Attributes:
449 -- profile_option_name - mandatory for creating a new profile option value
453 -- characters. This should be the internal name, NOT the
450 -- at the new responsibility level or at the new user level.
451 -- Length cannot exceed the length of
452 -- fnd_profile_options.profile_option_name, which is 80
454 -- fnd_profile_options_tl.user_profile_option_name.
455 -- For example, for the "HR: User Type" profile option, the value
456 -- to use should be "HR_USER_TYPE", the internal name.
457 --
458 -- profile_option_value - mandatory for creating a new profile option value
459 -- at the new responsibility level or at the new user level.
460 -- Length cannot exceed the length of
461 -- fnd_profile_option_values.profile_option_value, which is 240
462 -- characters.
463 -- Use the INTERNAL ID or VALUE for those HR profile options
464 -- which use SQL validations on the option values (ie. an LOV is -- used when entering a value). The following
465 -- profile options have SQL validations and thus supply the
466 -- id or the lookup code in profile_option_value field:
467 -- PROFILE_OPTION_NAME PROFILE_OPTION_VALUE
468 -- --------------------------- ------------------------------
469 -- HR:COST_MAND_SEG_CHECK A specific value in
470 -- fnd_common_lookups.lookup_code
471 -- where lookup_type = 'YES_NO'.
472 --
473 -- HR:EXECUTE_LEG_FORMULA A specific value in
474 -- fnd_common_lookups.lookup_code
475 -- where lookup_type = 'YES_NO'.
476 --
477 -- HR_BG_LOCATIONS A specific value in
478 -- fnd_common_lookups.lookup_code
479 -- where lookup_type = 'YES_NO'.
480 --
481 -- HR_DISPLAY_SKILLS A specific value in
482 -- fnd_common_lookups.lookup_code
483 -- where lookup_type = 'YES_NO'.
484 --
485 -- HR_PAYROLL_CURRENCY_RATES A specific value in
486 -- pay_payrolls_f.payroll_id.
487 --
488 -- HR_TIPS_TEST_MODE A specific value in
489 -- fnd_common_lookups.lookup_code
490 -- where lookup_type = 'YES_NO'.
491 --
492 -- HR_USER_TYPE A specific value in
493 -- fnd_common_lookups.lookup_code
494 -- where lookup_type =
495 -- 'HR_USER_TYPE'.
496 --
497 -- PER_ATTACHMENT_USAGE A specific value in
498 -- fnd_common_lookups.lookup_code
499 -- where lookup_type = 'YES_NO'.
500 --
501 -- PER_BUSINESS_GROUP_ID A specific business_group_id in
502 -- PER_BUSINESS_GROUPS.
503 --
504 -- PER_DEFAULT_NATIONALITY A specific value in
505 -- fnd_common_lookups.lookup_code
506 -- where lookup_type='NATIONALITY'
507 --
508 -- PER_QUERY_ONLY_MODE A specific value in
509 -- fnd_common_lookups.lookup_code
510 -- where lookup_type = 'YES_NO'.
511 --
512 -- PER_SECURITY_PROFILE_ID A security_profile_id in
513 -- per_security_profiles.
514 --
515 -- VIEW_UNPUBLISHED_360_SELF_APPR A specific value in
516 -- fnd_common_lookups.lookup_code
517 -- where lookup_type = 'YES_NO'.
518 --
519 -- profile_level_name - mandatory for creating a new profile option value
520 -- at the new responsibility level or at the new user level.
521 -- It must be either the value of "RESP" for
522 -- responsibility level or "USER" for user level. Other values
523 -- are invalid.
524 --
525 -- profile_level_value - mandatory for creating a new profile option value
526 -- at the new responsibility level or at the new user level.
527 -- It must be one of the following values:
528 -- - fnd_responsibility.responsbility_key if
529 -- profile_level_name = "RESP"
530 -- - fnd_user.user_id if profile_level_name = "USER".
531 --
532 -- Examples:
533 -- - to create a new profile option value for the
534 -- responsibility "US HRMS Manager", this field will be the
535 -- fnd_responsibility.responsibility_key, which is
536 -- "US_HRMS_MANAGER". If the responsibility is new, use
537 -- the fnd_responsibility_tbl.new_resp_key value.
538 -- - to create a new profile option value for the user
539 -- "SYSADMIN", this field will be the fnd_user.user_id, which
540 -- is 0.
541 --
542 -- profile_level_value_app_id - mandatory for creating a new profile option
546 -- profile_level_value.
543 -- value at the new responsibility level. If profile_level_name
544 -- is "USER", this field is ignored. This field is the value
545 -- the application id for the responsibility specified in
547 -- For example, to create a new profile option value for the
548 -- responsibility "US HRMS Manager", this field will be the
549 -- fnd_responsibility_tl.application_id, which is 800.
550 -- If the responsibility is new, use the
551 -- fnd_responsibility_tbl.new_resp_app_id value.
552 --
553 -- Example 1: To add a profile option value for the profile option name
554 -- 'PER_BUSINESS_GROUP_ID' at the responsibility level:
555 -- profile_option_name = fnd_profile_options.profile_option_name. In this
556 -- case is 'PER_BUSINESS_GROUP_ID'.
557 -- profile_option_value = whatever business group id value
558 -- profile_level_name = 'RESP' for responsibility
559 -- profile_level_value = the responsibility_key in this example.
560 -- Responsibility key is the unique key visible to the user in
561 -- the Define Responsibility form.
562 -- profile_level_value_app_id = 800 for the responsibility's application id
563 -- (NOTE: This field is only needed if the level id is 10003,
564 -- ie. at the "RESP" level. No need to supply a value if the
565 -- level name is "USER").
566 --
567 -- Example 2: To add a profile option value for the profile option name
568 -- ---------
569 -- 'HR_TIPS_TEST_MODE' at the user level, you would fill out
570 -- the following values:
571 -- profile_option_name = fnd_profile_options.profile_option_name. In this
572 -- case is 'HR_TIPS_TEST_MODE'.
573 -- profile_option_value = 'Y' or 'N', the quick code value for the quick code
574 -- type "YES_NO".
575 -- profile_level_name = 'USER' for user level.
576 -- profile_level_value = When creating users using API, this value need not
577 -- be set for profiles at user level, as user id is unknown.
578 -- profile_level_value_app_id = null
579 --
580 --------------------------------------------------------------------------------
581 --
582 -- RECORD STRUCTURE FOR FND_PROFILE_OPTION_VALUES
583 -- ==============================================
584 TYPE fnd_profile_opt_val_rec IS RECORD
585 (profile_option_name fnd_profile_options.profile_option_name%type
586 ,profile_option_value
587 fnd_profile_option_values.profile_option_value%type
588 ,profile_level_name varchar2(2000)
589 ,profile_level_value varchar2(30)
590 ,profile_level_value_app_id
591 fnd_profile_option_values.level_value_application_id%type
592 );
593
594 TYPE fnd_profile_opt_val_tbl IS TABLE OF fnd_profile_opt_val_rec
595 INDEX BY BINARY_INTEGER;
596
597 --
598 -- USE INDEX = 1 TO START LOADING THE TABLE.
599 g_fnd_profile_opt_val_tbl fnd_profile_opt_val_tbl;
600
601 --
602 ------------------------------------------------------------------------------
603 -- The following func_sec_excl_rec, func_sec_excl_tbl
604 -- declarations are for program internal processing. Customers can ignore
605 -- these definitions.
606 ------------------------------------------------------------------------------
607 TYPE func_sec_excl_rec IS RECORD
608 (resp_key fnd_responsibility.responsibility_key%type
609 ,rule_type fnd_resp_functions.rule_type%type
610 ,rule_name fnd_form_functions.function_name%type
611 ,delete_flag varchar2(1));
612 --
613 TYPE func_sec_excl_tbl IS TABLE OF func_sec_excl_rec
614 INDEX BY BINARY_INTEGER;
615 --
616 ------------------------------------------------------------------------------
617 -- Run Type value global variables
618 ------------------------------------------------------------------------------
619 g_cr_user_new_hires constant varchar2(30) := 'CREATE_USER_NEW_HIRES';
620 g_cr_user_all_emp constant varchar2(30) := 'CREATE_USER_ALL_EMP';
621 g_cr_n_inact_user constant varchar2(30) :='CREATE_N_INACTIVATE_USER';
622 g_inactivate_user constant varchar2(30) := 'INACTIVATE_USER';
623
624 --
625 end hr_user_acct_utility;