8: g_max_email_address_length constant number := 240;
9: g_max_fax_length constant number := 80;
10: g_api_vers constant number := 1.0;
11: g_empty_fnd_user_rec hr_user_acct_utility.fnd_user_rec;
12: g_emtpy_fnd_resp_tbl hr_user_acct_utility.fnd_responsibility_tbl;
13: g_emtpy_fnd_prof_opt_val_tbl hr_user_acct_utility.fnd_profile_opt_val_tbl;
14: --
15: -- ----------------------------------------------------------------------------
16: -- |--------------------------- < generate_string > ---------------------------|
343:
344: END create_fnd_user;
345: --
346: -- ----------------------------------------------------------------------------
347: -- |---------------------- < create_fnd_responsibility > ----------------------|
348: -- | |
349: -- |NOTE: No savepoint will be issued here because business support internal |
350: -- | process is not supposed to issue any savepoint or rollback. |
351: -- ----------------------------------------------------------------------------
349: -- |NOTE: No savepoint will be issued here because business support internal |
350: -- | process is not supposed to issue any savepoint or rollback. |
351: -- ----------------------------------------------------------------------------
352: --
353: PROCEDURE create_fnd_responsibility
354: (p_resp_key in fnd_responsibility.responsibility_key%type
355: ,p_resp_name in fnd_responsibility_tl.responsibility_name%type
356: ,p_resp_app_id in fnd_responsibility.application_id%type
357: ,p_resp_description in fnd_responsibility_tl.description%type
350: -- | process is not supposed to issue any savepoint or rollback. |
351: -- ----------------------------------------------------------------------------
352: --
353: PROCEDURE create_fnd_responsibility
354: (p_resp_key in fnd_responsibility.responsibility_key%type
355: ,p_resp_name in fnd_responsibility_tl.responsibility_name%type
356: ,p_resp_app_id in fnd_responsibility.application_id%type
357: ,p_resp_description in fnd_responsibility_tl.description%type
358: default null
351: -- ----------------------------------------------------------------------------
352: --
353: PROCEDURE create_fnd_responsibility
354: (p_resp_key in fnd_responsibility.responsibility_key%type
355: ,p_resp_name in fnd_responsibility_tl.responsibility_name%type
356: ,p_resp_app_id in fnd_responsibility.application_id%type
357: ,p_resp_description in fnd_responsibility_tl.description%type
358: default null
359: ,p_start_date in fnd_responsibility.start_date%type
352: --
353: PROCEDURE create_fnd_responsibility
354: (p_resp_key in fnd_responsibility.responsibility_key%type
355: ,p_resp_name in fnd_responsibility_tl.responsibility_name%type
356: ,p_resp_app_id in fnd_responsibility.application_id%type
357: ,p_resp_description in fnd_responsibility_tl.description%type
358: default null
359: ,p_start_date in fnd_responsibility.start_date%type
360: ,p_end_date in fnd_responsibility.end_date%type default null
353: PROCEDURE create_fnd_responsibility
354: (p_resp_key in fnd_responsibility.responsibility_key%type
355: ,p_resp_name in fnd_responsibility_tl.responsibility_name%type
356: ,p_resp_app_id in fnd_responsibility.application_id%type
357: ,p_resp_description in fnd_responsibility_tl.description%type
358: default null
359: ,p_start_date in fnd_responsibility.start_date%type
360: ,p_end_date in fnd_responsibility.end_date%type default null
361: ,p_data_group_name in fnd_data_groups_standard_view.data_group_name%type
355: ,p_resp_name in fnd_responsibility_tl.responsibility_name%type
356: ,p_resp_app_id in fnd_responsibility.application_id%type
357: ,p_resp_description in fnd_responsibility_tl.description%type
358: default null
359: ,p_start_date in fnd_responsibility.start_date%type
360: ,p_end_date in fnd_responsibility.end_date%type default null
361: ,p_data_group_name in fnd_data_groups_standard_view.data_group_name%type
362: ,p_data_group_app_id in fnd_responsibility.data_group_application_id%type
363: ,p_menu_name in fnd_menus.menu_name%type
356: ,p_resp_app_id in fnd_responsibility.application_id%type
357: ,p_resp_description in fnd_responsibility_tl.description%type
358: default null
359: ,p_start_date in fnd_responsibility.start_date%type
360: ,p_end_date in fnd_responsibility.end_date%type default null
361: ,p_data_group_name in fnd_data_groups_standard_view.data_group_name%type
362: ,p_data_group_app_id in fnd_responsibility.data_group_application_id%type
363: ,p_menu_name in fnd_menus.menu_name%type
364: ,p_request_group_name in fnd_request_groups.request_group_name%type
358: default null
359: ,p_start_date in fnd_responsibility.start_date%type
360: ,p_end_date in fnd_responsibility.end_date%type default null
361: ,p_data_group_name in fnd_data_groups_standard_view.data_group_name%type
362: ,p_data_group_app_id in fnd_responsibility.data_group_application_id%type
363: ,p_menu_name in fnd_menus.menu_name%type
364: ,p_request_group_name in fnd_request_groups.request_group_name%type
365: default null
366: ,p_request_group_app_id in fnd_responsibility.group_application_id%type
362: ,p_data_group_app_id in fnd_responsibility.data_group_application_id%type
363: ,p_menu_name in fnd_menus.menu_name%type
364: ,p_request_group_name in fnd_request_groups.request_group_name%type
365: default null
366: ,p_request_group_app_id in fnd_responsibility.group_application_id%type
367: default null
368: ,p_version in fnd_responsibility.version%type default '4'
369: ,p_web_host_name in fnd_responsibility.web_host_name%type default null
370: ,p_web_agent_name in fnd_responsibility.web_agent_name%type
364: ,p_request_group_name in fnd_request_groups.request_group_name%type
365: default null
366: ,p_request_group_app_id in fnd_responsibility.group_application_id%type
367: default null
368: ,p_version in fnd_responsibility.version%type default '4'
369: ,p_web_host_name in fnd_responsibility.web_host_name%type default null
370: ,p_web_agent_name in fnd_responsibility.web_agent_name%type
371: default null
372: ,p_responsibility_id out nocopy number
365: default null
366: ,p_request_group_app_id in fnd_responsibility.group_application_id%type
367: default null
368: ,p_version in fnd_responsibility.version%type default '4'
369: ,p_web_host_name in fnd_responsibility.web_host_name%type default null
370: ,p_web_agent_name in fnd_responsibility.web_agent_name%type
371: default null
372: ,p_responsibility_id out nocopy number
373: ) IS
366: ,p_request_group_app_id in fnd_responsibility.group_application_id%type
367: default null
368: ,p_version in fnd_responsibility.version%type default '4'
369: ,p_web_host_name in fnd_responsibility.web_host_name%type default null
370: ,p_web_agent_name in fnd_responsibility.web_agent_name%type
371: default null
372: ,p_responsibility_id out nocopy number
373: ) IS
374: --
384: SELECT 1
385: FROM sys.dual
386: WHERE NOT EXISTS
387: (SELECT 1
388: FROM fnd_responsibility
389: WHERE responsibility_key = p_resp_key
390: AND application_id = p_resp_app_id);
391: --
392: -- The following check unique resp name sql is copied from FNDSCRSP.fmb,
396: SELECT 1
397: FROM sys.dual
398: WHERE NOT EXISTS
399: (SELECT 1
400: FROM fnd_responsibility_vl
401: WHERE responsibility_name = p_resp_name
402: AND application_id = p_resp_app_id);
403: --
404: CURSOR lc_get_data_group_id IS
417: WHERE request_group_name = p_request_group_name
418: AND application_id = p_request_group_app_id;
419: --
420: CURSOR lc_generate_resp_id IS
421: SELECT fnd_responsibility_s.nextval
422: FROM sys.dual;
423:
424:
425: l_proc varchar2(72) := g_package||'create_fnd_responsibility';
421: SELECT fnd_responsibility_s.nextval
422: FROM sys.dual;
423:
424:
425: l_proc varchar2(72) := g_package||'create_fnd_responsibility';
426: l_resp_app_short_name fnd_application.application_short_name%type := null;
427: l_data_grp_app_short_name fnd_application.application_short_name%type := null;
428: l_req_grp_app_short_name fnd_application.application_short_name%type := null;
429: l_dummy number default null;
426: l_resp_app_short_name fnd_application.application_short_name%type := null;
427: l_data_grp_app_short_name fnd_application.application_short_name%type := null;
428: l_req_grp_app_short_name fnd_application.application_short_name%type := null;
429: l_dummy number default null;
430: l_request_group_app_id fnd_responsibility.group_application_id%type
431: default null;
432: l_responsibility_id fnd_responsibility.responsibility_id%type default null;
433: l_data_grp_id fnd_data_groups.data_group_id%type default null;
434: l_req_grp_app_id fnd_request_groups.application_id%type default null;
428: l_req_grp_app_short_name fnd_application.application_short_name%type := null;
429: l_dummy number default null;
430: l_request_group_app_id fnd_responsibility.group_application_id%type
431: default null;
432: l_responsibility_id fnd_responsibility.responsibility_id%type default null;
433: l_data_grp_id fnd_data_groups.data_group_id%type default null;
434: l_req_grp_app_id fnd_request_groups.application_id%type default null;
435: --
436: BEGIN
635: IF lc_generate_resp_id%NOTFOUND
636: THEN
637: CLOSE lc_generate_resp_id;
638: fnd_message.set_name('FND', 'SQL_NO_DATA_FOUND');
639: fnd_message.set_token('SEQUENCE', 'FND_RESPONSIBILITY_S');
640: fnd_message.set_token('COLUMN', 'RESPONSIBILITY_ID');
641: fnd_message.set_token('VALUE', 'NULL');
642: hr_utility.raise_error;
643: ELSE
671: p_responsibility_id := l_responsibility_id;
672:
673: hr_utility.set_location('Leaving:'||l_proc, 50);
674:
675: END create_fnd_responsibility;
676: --
677: -- ----------------------------------------------------------------------------
678: -- |-------------------- < create_fnd_user_resp_groups > ----------------------|
679: -- |NOTE: No savepoint will be issued here because business support internal |
681: -- ----------------------------------------------------------------------------
682: --
683: PROCEDURE create_fnd_user_resp_groups
684: (p_user_id in fnd_user.user_id%type
685: ,p_responsibility_id in fnd_responsibility.responsibility_id%type
686: ,p_application_id in
687: fnd_user_resp_groups.responsibility_application_id%type
688: ,p_sec_group_id in fnd_user_resp_groups.security_group_id%type
689: ,p_start_date in fnd_user_resp_groups.start_date%type
699: WHERE user_id = p_user_id;
700: --
701: CURSOR lc_get_resp_id IS
702: SELECT responsibility_id
703: FROM fnd_responsibility
704: WHERE responsibility_id = p_responsibility_id;
705: --
706: CURSOR lc_get_app_id IS
707: SELECT application_id
754: IF lc_get_resp_id%NOTFOUND
755: THEN
756: CLOSE lc_get_resp_id;
757: fnd_message.set_name('FND', 'SQL_NO_DATA_FOUND');
758: fnd_message.set_token('TABLE', 'FND_RESPONSIBILITY');
759: fnd_message.set_token('COLUMN', 'RESPONSIBILITY_ID');
760: fnd_message.set_token('VALUE', to_char(p_responsibility_id));
761: hr_utility.raise_error;
762: ELSE
847: PROCEDURE create_sec_profile_asg
848: (p_user_id in fnd_user.user_id%type
849: ,p_sec_group_id in fnd_security_groups.security_group_id%type
850: ,p_sec_profile_id in per_security_profiles.security_profile_id%type
851: ,p_resp_key in fnd_responsibility.responsibility_key%type
852: ,p_resp_app_id in
853: per_sec_profile_assignments.responsibility_application_id%type
854: ,p_start_date in per_sec_profile_assignments.start_date%type
855: ,p_end_date in per_sec_profile_assignments.end_date%type
877: WHERE security_profile_id = p_sec_profile_id;
878: --
879: CURSOR lc_get_resp_id IS
880: SELECT responsibility_id
881: FROM fnd_responsibility
882: WHERE responsibility_key = p_resp_key
883: AND application_id = p_resp_app_id;
884:
885: l_bg_id per_security_profiles.business_group_id%type := null;
882: WHERE responsibility_key = p_resp_key
883: AND application_id = p_resp_app_id;
884:
885: l_bg_id per_security_profiles.business_group_id%type := null;
886: l_resp_id fnd_responsibility.responsibility_id%type := null;
887: l_dummy number default null;
888: l_sec_prof_asg_id
889: per_sec_profile_assignments.sec_profile_assignment_id%type := null;
890: l_obj_vers_num
923: IF lc_get_resp_id%NOTFOUND
924: THEN
925: CLOSE lc_get_resp_id;
926: fnd_message.set_name('FND', 'SQL_NO_DATA_FOUND');
927: fnd_message.set_token('TABLE', 'FND_RESPONSIBILITY');
928: fnd_message.set_token('COLUMN', 'RESPONSIBILITY_KEY');
929: fnd_message.set_token('VALUE', p_resp_key);
930: hr_utility.raise_error;
931: ELSE
1274: -- OM_DEFAULT_EVENT_SYSTEM_STATUS HR_LOOKUPS
1275: -- OM_DEFAULT_EVENT_USER_STATUS HR_LOOKUPS
1276: -- HR_TAX_LOCATION_CHANGE FND_LOOKUPS
1277: -- OTA_SSHR_AUTO_GL_TRANSFER FND_LOOKUPS
1278: -- BEN_NEW_USER_RESP_PROFILE FND_RESPONSIBILITY_TL,
1279: -- FND_RESPONSIBILITY
1280: -- BEN_USER_TO_ORG_LINK HR_ALL_ORGANIZATION_UNITS,
1281: -- HR_ALL_ORGANIZATION_UNITS_TL
1282: -- OTA_HR_GLOBAL_BUSINESS_GROUP_ID PER_BUSINESS_GROUPS
1275: -- OM_DEFAULT_EVENT_USER_STATUS HR_LOOKUPS
1276: -- HR_TAX_LOCATION_CHANGE FND_LOOKUPS
1277: -- OTA_SSHR_AUTO_GL_TRANSFER FND_LOOKUPS
1278: -- BEN_NEW_USER_RESP_PROFILE FND_RESPONSIBILITY_TL,
1279: -- FND_RESPONSIBILITY
1280: -- BEN_USER_TO_ORG_LINK HR_ALL_ORGANIZATION_UNITS,
1281: -- HR_ALL_ORGANIZATION_UNITS_TL
1282: -- OTA_HR_GLOBAL_BUSINESS_GROUP_ID PER_BUSINESS_GROUPS
1283: -- HR_DISPLAY_ALL_OFFERS FND_LOOKUPS
1457:
1458: -- BEN_NEW_USER_RESP_PROFILE
1459: CURSOR lc_get_new_usr_resp_profl IS
1460: SELECT L.RESPONSIBILITY_NAME visible_option_value ,TO_CHAR(L.RESPONSIBILITY_ID)|| TO_CHAR(L.APPLICATION_ID) profile_option_value
1461: FROM FND_RESPONSIBILITY_TL L,
1462: FND_RESPONSIBILITY R
1463: WHERE R.RESPONSIBILITY_ID = L.RESPONSIBILITY_ID
1464: AND R.APPLICATION_ID = L.APPLICATION_ID
1465: AND L.LANGUAGE = USERENV('LANG')
1458: -- BEN_NEW_USER_RESP_PROFILE
1459: CURSOR lc_get_new_usr_resp_profl IS
1460: SELECT L.RESPONSIBILITY_NAME visible_option_value ,TO_CHAR(L.RESPONSIBILITY_ID)|| TO_CHAR(L.APPLICATION_ID) profile_option_value
1461: FROM FND_RESPONSIBILITY_TL L,
1462: FND_RESPONSIBILITY R
1463: WHERE R.RESPONSIBILITY_ID = L.RESPONSIBILITY_ID
1464: AND R.APPLICATION_ID = L.APPLICATION_ID
1465: AND L.LANGUAGE = USERENV('LANG')
1466: AND R.APPLICATION_ID = 805;
1901: -- ----------------------------------------------------------------------------
1902: -- |----------------------- < build_resp_profile_val > -----------------------|
1903: -- ----------------------------------------------------------------------------
1904: PROCEDURE build_resp_profile_val
1905: (p_template_resp_id in fnd_responsibility.responsibility_id%type
1906: default null
1907: ,p_template_resp_app_id in fnd_responsibility.application_id%type
1908: default null
1909: ,p_new_resp_key in fnd_responsibility.responsibility_key%type
1903: -- ----------------------------------------------------------------------------
1904: PROCEDURE build_resp_profile_val
1905: (p_template_resp_id in fnd_responsibility.responsibility_id%type
1906: default null
1907: ,p_template_resp_app_id in fnd_responsibility.application_id%type
1908: default null
1909: ,p_new_resp_key in fnd_responsibility.responsibility_key%type
1910: ,p_new_resp_app_id in fnd_responsibility.application_id%type
1911: ,p_fnd_profile_opt_val_tbl in
1905: (p_template_resp_id in fnd_responsibility.responsibility_id%type
1906: default null
1907: ,p_template_resp_app_id in fnd_responsibility.application_id%type
1908: default null
1909: ,p_new_resp_key in fnd_responsibility.responsibility_key%type
1910: ,p_new_resp_app_id in fnd_responsibility.application_id%type
1911: ,p_fnd_profile_opt_val_tbl in
1912: hr_user_acct_utility.fnd_profile_opt_val_tbl
1913: ,p_out_profile_opt_val_tbl out
1906: default null
1907: ,p_template_resp_app_id in fnd_responsibility.application_id%type
1908: default null
1909: ,p_new_resp_key in fnd_responsibility.responsibility_key%type
1910: ,p_new_resp_app_id in fnd_responsibility.application_id%type
1911: ,p_fnd_profile_opt_val_tbl in
1912: hr_user_acct_utility.fnd_profile_opt_val_tbl
1913: ,p_out_profile_opt_val_tbl out
1914: hr_user_acct_utility.fnd_profile_opt_val_tbl
2022: ,p_out_func_sec_excl_tbl out nocopy hr_user_acct_utility.func_sec_excl_tbl)
2023: IS
2024: --
2025: CURSOR lc_get_resp_id (p_resp_key in
2026: fnd_responsibility.responsibility_key%TYPE)
2027: IS
2028: SELECT application_id, responsibility_id
2029: FROM fnd_responsibility
2030: WHERE responsibility_key = p_resp_key;
2025: CURSOR lc_get_resp_id (p_resp_key in
2026: fnd_responsibility.responsibility_key%TYPE)
2027: IS
2028: SELECT application_id, responsibility_id
2029: FROM fnd_responsibility
2030: WHERE responsibility_key = p_resp_key;
2031: --
2032: CURSOR lc_get_resp_func (p_resp_id in
2033: fnd_responsibility.responsibility_id%TYPE
2029: FROM fnd_responsibility
2030: WHERE responsibility_key = p_resp_key;
2031: --
2032: CURSOR lc_get_resp_func (p_resp_id in
2033: fnd_responsibility.responsibility_id%TYPE
2034: ,p_app_id in
2035: fnd_responsibility.application_id%TYPE)
2036: IS
2037: SELECT action_id, rule_type
2031: --
2032: CURSOR lc_get_resp_func (p_resp_id in
2033: fnd_responsibility.responsibility_id%TYPE
2034: ,p_app_id in
2035: fnd_responsibility.application_id%TYPE)
2036: IS
2037: SELECT action_id, rule_type
2038: FROM fnd_resp_functions
2039: WHERE application_id = p_app_id
2182: -- | process is not supposed to issue any savepoint or rollback. |
2183: -- ----------------------------------------------------------------------------
2184: --
2185: PROCEDURE create_fnd_resp_functions
2186: (p_resp_key in fnd_responsibility.responsibility_key%type
2187: ,p_rule_type in fnd_resp_functions.rule_type%type
2188: ,p_rule_name in varchar2
2189: ,p_delete_flag in varchar2 default 'N')
2190: IS
2191: --
2192: CURSOR lc_get_resp_id
2193: IS
2194: SELECT responsibility_id
2195: FROM fnd_responsibility
2196: WHERE responsibility_key = p_resp_key;
2197: --
2198: CURSOR lc_get_function_id
2199: IS
2227: IF lc_get_resp_id%NOTFOUND
2228: THEN
2229: CLOSE lc_get_resp_id;
2230: fnd_message.set_name('FND', 'SQL_NO_DATA_FOUND');
2231: fnd_message.set_token('TABLE', 'FND_RESPONSIBILITY');
2232: fnd_message.set_token('COLUMN', 'RESPONSIBILITY_KEY');
2233: fnd_message.set_token('VALUE', p_resp_key);
2234:
2235: hr_utility.set_message(800, 'HR_INVALID_RESP_KEY');
2552: --
2553: CURSOR lc_get_resp_id_n_key IS
2554: SELECT responsibility_id
2555: ,responsibility_key
2556: FROM fnd_responsibility
2557: WHERE responsibility_id = p_responsibility_id;
2558: --
2559: CURSOR lc_get_app_id IS
2560: SELECT application_id
2592: l_dummy number default null;
2593: l_start_date date default null;
2594: l_end_date date default null;
2595: l_description fnd_user_resp_groups.description%type default null;
2596: l_resp_key fnd_responsibility.responsibility_key%type default null;
2597: l_fnd_user_resp_data lc_user_resp_row%rowtype;
2598: --
2599: BEGIN
2600: hr_utility.set_location('Entering:' || l_proc, 10);
2631: IF lc_get_resp_id_n_key%NOTFOUND
2632: THEN
2633: CLOSE lc_get_resp_id_n_key;
2634: fnd_message.set_name('FND', 'SQL_NO_DATA_FOUND');
2635: fnd_message.set_token('TABLE', 'FND_RESPONSIBILITY');
2636: fnd_message.set_token('COLUMN', 'RESPONSIBILITY_ID');
2637: fnd_message.set_token('VALUE', to_char(p_responsibility_id));
2638: hr_utility.raise_error;
2639: ELSE
2802: AND security_group_id = p_security_group_id;
2803: --
2804: CURSOR lc_get_resp_id IS
2805: SELECT responsibility_key
2806: FROM fnd_responsibility
2807: WHERE responsibility_id = p_responsibility_id
2808: AND application_id = p_resp_app_id;
2809:
2810: l_dummy number default null;
2807: WHERE responsibility_id = p_responsibility_id
2808: AND application_id = p_resp_app_id;
2809:
2810: l_dummy number default null;
2811: l_resp_key fnd_responsibility.responsibility_key%type default null;
2812: l_sec_prof_asg_id
2813: per_sec_profile_assignments.sec_profile_assignment_id%type := null;
2814: l_security_group_id per_sec_profile_assignments.security_group_id%type
2815: default null;
2862: IF lc_get_resp_id%NOTFOUND
2863: THEN
2864: CLOSE lc_get_resp_id;
2865: fnd_message.set_name('FND', 'SQL_NO_DATA_FOUND');
2866: fnd_message.set_token('TABLE', 'FND_RESPONSIBILITY');
2867: fnd_message.set_token('COLUMN', 'RESPONSIBILITY_ID');
2868: fnd_message.set_token('VALUE', p_responsibility_id);
2869: hr_utility.raise_error;
2870: ELSE