DBA Data[Home] [Help]

APPS.FND_GLOBAL dependencies on FND_GLOBAL

Line 1: package body fnd_global as

1: package body fnd_global as
2: /* $Header: AFSCGBLB.pls 120.64.12020000.7 2013/02/28 20:48:23 rarmaly ship $ */
3:
4: procedure dump_context;
5:

Line 112: -- named fnd_global_debug_table. Don't enable this

108: -- using debug_to_table.
109: debug_to_console boolean := false;
110:
111: -- NOTE: This will attempt to create a database table
112: -- named fnd_global_debug_table. Don't enable this
113: -- unless it's okay to create that table. The contents
114: -- may be security sensitive.
115: debug_to_table boolean := false;
116:

Line 136: -- Enables logging to core logging for fnd_global if core logging is enabled.

132: -- Constant string used to indicate a delete request in PUT cache.
133: FND_DELETE_VALUE VARCHAR2(30) := '**FND_DELETE_VALUE**';
134:
135: --
136: -- Enables logging to core logging for fnd_global if core logging is enabled.
137: -- It should be called from the primary public routines. For example,
138: -- initialize, and the set_nl* routines.
139: procedure check_logging
140: is

Line 146: dest := upper(sys_context(FND_CONST.FND,'FND_GLOBAL_DEBUG_LOGGING'));

142: begin
143:
144: debug_to_core := fnd_core_log.enabled <> 'N';
145:
146: dest := upper(sys_context(FND_CONST.FND,'FND_GLOBAL_DEBUG_LOGGING'));
147: debug_to_console := dest like '%CONSOLE%';
148: debug_to_table := dest like '%TABLE%';
149:
150: -- enables debug output if a destination is enabled.

Line 178: -- DO NOT use any fnd_global routines within this routine.

174: end check_logging;
175:
176: -- General purpose debugger. Will direct debugging based on
177: -- the debug_to_* flags above.
178: -- DO NOT use any fnd_global routines within this routine.
179: -- DO NOT call anything outside fnd_global except fnd_core_log.put.
180: procedure debugger(text varchar2)
181: is
182: pragma autonomous_transaction;

Line 179: -- DO NOT call anything outside fnd_global except fnd_core_log.put.

175:
176: -- General purpose debugger. Will direct debugging based on
177: -- the debug_to_* flags above.
178: -- DO NOT use any fnd_global routines within this routine.
179: -- DO NOT call anything outside fnd_global except fnd_core_log.put.
180: procedure debugger(text varchar2)
181: is
182: pragma autonomous_transaction;
183: begin

Line 206: 'create table fnd_global_debug_table (

202: -- session but it's probably not much worse than having to
203: -- verify the existence each time either.
204: begin
205: execute immediate
206: 'create table fnd_global_debug_table (
207: text varchar2(2000)
208: ,counter integer
209: ,when date
210: ,who integer)';

Line 218: 'insert into fnd_global_debug_table

214: end if;
215:
216: begin
217: execute immediate
218: 'insert into fnd_global_debug_table
219: values (:text,:debug_counter,sysdate,userenv(''sessionid''))'
220: using text,debug_counter;
221: commit;
222: exception

Line 468: throw('fnd_global.put('||name||','||value||')',

464: return false;
465:
466: exception
467: when others then
468: throw('fnd_global.put('||name||','||value||')',
469: sqlcode, dbms_utility.format_error_stack);
470: end put;
471:
472: -- same as put_nosys but disposes of the return value

Line 1183: -- Also, this API doesn't execute during fnd_global.initialize's call

1179:
1180: --
1181: -- This is called in set_nls *after* any nls context changes have occurred
1182: -- and the nls_context_change flag has been set, if there were any changes.
1183: -- Also, this API doesn't execute during fnd_global.initialize's call
1184: -- to set_nls so it'll only run during direct calls to set_nls.
1185: --
1186: procedure post_nls_change is begin
1187: restore_hash(z_context,z_context_names,z_context_values);

Line 1489: throw('fnd_global.set_nls.set_parameter('''||

1485: return false;
1486:
1487: exception
1488: when others then
1489: throw('fnd_global.set_nls.set_parameter('''||
1490: p_parameter||''','''||
1491: p_value||''')',
1492: sqlcode, dbms_utility.format_error_stack);
1493: end set_parameter;

Line 1584: throw('fnd_global.set_nls',

1580: end if;
1581:
1582: exception
1583: when others then
1584: throw('fnd_global.set_nls',
1585: sqlcode, dbms_utility.format_error_stack);
1586: end set_nls;
1587:
1588: -- legacy routine that simply calls through to set_nls.

Line 1679: log('fnd_global.set_nls.13', sqlcode, dbms_utility.format_error_stack);

1675: end if;
1676:
1677: exception
1678: when others then
1679: log('fnd_global.set_nls.13', sqlcode, dbms_utility.format_error_stack);
1680: end set_nls;
1681:
1682: --
1683: -- builds the conditions passed to fnd_product_initialization.

Line 1769: -- FND_GLOBAL.ORG_ID. Per guidance from MO Team, there are 3

1765:
1766: -- For R12, MO supports Multiple Organization Access Control (MOAC)
1767: -- which allows access to multiple operating units during a session.
1768: -- FND still requires an org_id context to set for FND_PROFILE via
1769: -- FND_GLOBAL.ORG_ID. Per guidance from MO Team, there are 3
1770: -- profiles to determine the ORG_ID to set at initialization:
1771: -- MO: Security Profile
1772: -- MO: Default Operating Unit
1773: -- MO: Operating Unit

Line 1804: -- FND_GLOBAL.ORG_ID not always equal to the return value of

1800: -- Bug 7109984
1801: -- If MO: Default Operating Unit returns a value, set it as
1802: -- the initial ORG_ID, the organization context.
1803: -- Note: this would make the return value of
1804: -- FND_GLOBAL.ORG_ID not always equal to the return value of
1805: -- FND_PROFILE.value('ORG_ID') since FND_GLOBAL.ORG_ID refers
1806: -- to the org context while FND_PROFILE.value('ORG_ID')
1807: -- refers to the value of the profile option MO: Operating
1808: -- Unit which are not the same.

Line 1805: -- FND_PROFILE.value('ORG_ID') since FND_GLOBAL.ORG_ID refers

1801: -- If MO: Default Operating Unit returns a value, set it as
1802: -- the initial ORG_ID, the organization context.
1803: -- Note: this would make the return value of
1804: -- FND_GLOBAL.ORG_ID not always equal to the return value of
1805: -- FND_PROFILE.value('ORG_ID') since FND_GLOBAL.ORG_ID refers
1806: -- to the org context while FND_PROFILE.value('ORG_ID')
1807: -- refers to the value of the profile option MO: Operating
1808: -- Unit which are not the same.
1809: --

Line 1914: -- that FND_GLOBAL.ORG_ID = substrb(userenv('CLIENT_INFO'),1,10).

1910: begin
1911: v_org_name := org_name;
1912: end;
1913: -- This synchronizes the org context with the client_info space such
1914: -- that FND_GLOBAL.ORG_ID = substrb(userenv('CLIENT_INFO'),1,10).
1915: fnd_client_info.set_org_context(org_id);
1916: -- Reset the transient profile option CURRENT_ORG_CONTEXT if the org
1917: -- context changes. Re-initialize the org context for FND_PROFILE.
1918: if fnd_release.major_version >= 12 then

Line 2291: -- and the following relies on FND_GLOBAL.set_nls() being called when

2287:
2288: -- Profiles must be properly initialized before fnd_number.initialize.
2289: --
2290: -- Bug 2489275 - Since ICX_DATE_FORMAT_MASK is not tied to NLS_DATE_FORMAT,
2291: -- and the following relies on FND_GLOBAL.set_nls() being called when
2292: -- people want to initialize FND_DATE and FND_NUMBER packages, FND_DATE has
2293: -- been removed from this conditional and we leave FND_NUMBER which should
2294: -- be NLS related.
2295: --

Line 2341: -- and either this is the first time into FND_GLOBAL.initialize or there

2337: if context_changed then
2338:
2339: -- Bug 2489275, FND_DATE.initialize will only be called with the
2340: -- ICX_DATE_FORMAT_MASK profile value if the profile value is NOT NULL
2341: -- and either this is the first time into FND_GLOBAL.initialize or there
2342: -- has been a real context change.
2343: declare
2344: user_calendar varchar2(20);
2345: plsql_block varchar2(240) := 'begin fnd_date.initialize_with_calendar(:1, null, :2); end;';

Line 2390: -- FND_PRODUCT_INITIALIZATION is no longer supported in FND_Global for R12++ see:

2386: null;
2387: end;
2388:
2389:
2390: -- FND_PRODUCT_INITIALIZATION is no longer supported in FND_Global for R12++ see:
2391: -- http://files.oraclecorp.com/content/AllPublic/SharedFolders/ATG%20Requirements-Public/R12/Requirements%20Definition%20Document/Performance/session_initialization_callbacks.doc
2392: -- Also see bug 5263334 for follow on discussions about use of DiscoInit and
2393: -- the fnd_product_initialization table.
2394: --

Line 2398: -- bundled very tightly with FND Global and Profiles ... mskees.

2394: --
2395: -- The ONLY exception to this for R12++ is HR (prod=PER)
2396: -- and PER-dependent applications which require HR Security init function
2397: -- from the HR_SIGNON PKG that is used to setup HR Security group profiles which are
2398: -- bundled very tightly with FND Global and Profiles ... mskees.
2399: declare
2400: doInit boolean;
2401: conditions varchar2(80) := build_conditions;
2402: begin

Line 2456: -- Bug 8335361: With MO_GLOBAL now calling FND_GLOBAL.INITIALIZE and

2452: tmpbuf varchar2(2000) := get(FND_CONST.FND_INIT_SQL);
2453: rows integer;
2454: begin
2455:
2456: -- Bug 8335361: With MO_GLOBAL now calling FND_GLOBAL.INITIALIZE and
2457: -- FND_INIT_SQL allowing MO_GLOBAL APIs to be used, there is a possibility
2458: -- that a recursive call might occur. So, need to check whether the code
2459: -- is already in this code block.
2460: if not in_fnd_init_sql then

Line 2507: throw('fnd_global.initialize[fnd_init_sql]',

2503: if (dbms_sql.is_open(curs)) then
2504: dbms_sql.close_cursor(curs);
2505: end if;
2506: in_fnd_init_sql := FALSE;
2507: throw('fnd_global.initialize[fnd_init_sql]',
2508: sqlcode, dbms_utility.format_error_stack);
2509: end;
2510:
2511: -- Bug 12875860 - mskees - HR security group profile control

Line 2522: -- then set FND_GLOBAL local variables for both PER_SECURITY_PROFILE_ID and

2518: -- "ENABLE_SECURITY_GROUPS = 'Y' -> call HR_SIGNON.INITIALIZE_HR_SECURITY
2519: -- via fnd_product_initialization_pkg for any change in user_id,
2520: -- application_id, responsibility_id or security_group_id. This will
2521: -- set/reset the Profile PUT cache values for these PER profiles, we will
2522: -- then set FND_GLOBAL local variables for both PER_SECURITY_PROFILE_ID and
2523: -- PER_BUSINESS_GROUP_ID."
2524: --
2525: -- But if INITIALIZE is called twice with the same or similar parameters
2526: -- we will reset the profile cache but since there has been no context

Line 2690: if (FND_GLOBAL.ORG_ID <> to_number(value)) then

2686: -- If initialize was called for an org_context change and the applications
2687: -- release is R12, then the code will just change the org context if the
2688: -- current org_context is not equal to the org_context passed in.
2689: if upper(name) = 'ORG_ID' and fnd_release.major_version >= 12 then
2690: if (FND_GLOBAL.ORG_ID <> to_number(value)) then
2691: if is_debugging then
2692: -- This will indicate the caller of this API when an attempt to
2693: -- change the org context is made.
2694: debugger(dbms_utility.format_call_stack);

Line 2697: debugger('Org Context change:New ORG_ID='||value||' FND_GLOBAL.ORG_ID='

2693: -- change the org context is made.
2694: debugger(dbms_utility.format_call_stack);
2695: -- This indicates what the org context is being changed to, and what
2696: -- it is currently set to.
2697: debugger('Org Context change:New ORG_ID='||value||' FND_GLOBAL.ORG_ID='
2698: ||FND_GLOBAL.ORG_ID);
2699: end if;
2700: put(upper(name),value);
2701: initialize_org_context;

Line 2698: ||FND_GLOBAL.ORG_ID);

2694: debugger(dbms_utility.format_call_stack);
2695: -- This indicates what the org context is being changed to, and what
2696: -- it is currently set to.
2697: debugger('Org Context change:New ORG_ID='||value||' FND_GLOBAL.ORG_ID='
2698: ||FND_GLOBAL.ORG_ID);
2699: end if;
2700: put(upper(name),value);
2701: initialize_org_context;
2702: else

Line 2704: debugger('Org Context unchanged: FND_GLOBAL.ORG_ID=ORG_ID');

2700: put(upper(name),value);
2701: initialize_org_context;
2702: else
2703: if is_debugging then
2704: debugger('Org Context unchanged: FND_GLOBAL.ORG_ID=ORG_ID');
2705: end if;
2706: end if;
2707: else
2708: -- Initialize normally

Line 2725: log('fnd_global.set_security_group_id_context',

2721: begin
2722: initialize(FND_CONST.SECURITY_GROUP_ID, to_char(security_group_id));
2723: exception
2724: when others then
2725: log('fnd_global.set_security_group_id_context',
2726: sqlcode, dbms_utility.format_error_stack);
2727: end;
2728:
2729: --

Line 2806: session_id := fnd_global.session_id;

2802:
2803: -- mode_in since the only out variable can be obtained from a function
2804: initialize(FND_CONST.MODE_IN,v_nv);
2805:
2806: session_id := fnd_global.session_id;
2807:
2808: end initialize;
2809:
2810: --

Line 2881: 'Developer error: FND_GLOBAL initialization potential side effects. '||

2877: begin
2878:
2879: if (fnd_profile.value('FND_DEVELOPER_MODE') = 'Y') then
2880: raise_application_error(-20009,
2881: 'Developer error: FND_GLOBAL initialization potential side effects. '||
2882: 'Remove the call that initialized the context to resp_id: '||
2883: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2884: user_id || '. '||
2885: 'This message indicates that the context value set with the last ' ||

Line 2886: 'FND_GLOBAL init call could unintentionally affect code running ' ||

2882: 'Remove the call that initialized the context to resp_id: '||
2883: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2884: user_id || '. '||
2885: 'This message indicates that the context value set with the last ' ||
2886: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2887: 'later on in the session. '||
2888: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2889: 'initialization routines. It does not indicate any problem with the '||
2890: 'FND_GLOBAL package itself. '||

Line 2888: 'This message indicates a problem in a previous call to FND_GLOBAL '||

2884: user_id || '. '||
2885: 'This message indicates that the context value set with the last ' ||
2886: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2887: 'later on in the session. '||
2888: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2889: 'initialization routines. It does not indicate any problem with the '||
2890: 'FND_GLOBAL package itself. '||
2891: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2892: 'message in a production environment.');

Line 2890: 'FND_GLOBAL package itself. '||

2886: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2887: 'later on in the session. '||
2888: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2889: 'initialization routines. It does not indicate any problem with the '||
2890: 'FND_GLOBAL package itself. '||
2891: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2892: 'message in a production environment.');
2893: end if;
2894:

Line 2899: 'oracle.apps.plsql.fnd_global.restore.changed ',

2895: initialize(z_backup);
2896:
2897: if(fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
2898: fnd_log.string(FND_LOG.LEVEL_EXCEPTION,
2899: 'oracle.apps.plsql.fnd_global.restore.changed ',
2900: 'Developer error: FND_GLOBAL initialization potential side effects. '||
2901: 'Remove the call that initialized the context to resp_id: '||
2902: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2903: user_id || '. '||

Line 2900: 'Developer error: FND_GLOBAL initialization potential side effects. '||

2896:
2897: if(fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
2898: fnd_log.string(FND_LOG.LEVEL_EXCEPTION,
2899: 'oracle.apps.plsql.fnd_global.restore.changed ',
2900: 'Developer error: FND_GLOBAL initialization potential side effects. '||
2901: 'Remove the call that initialized the context to resp_id: '||
2902: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2903: user_id || '. '||
2904: 'This message indicates that the context value set with the last ' ||

Line 2905: 'FND_GLOBAL init call could unintentionally affect code running ' ||

2901: 'Remove the call that initialized the context to resp_id: '||
2902: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2903: user_id || '. '||
2904: 'This message indicates that the context value set with the last ' ||
2905: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2906: 'later on in the session. '||
2907: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2908: 'initialization routines. It does not indicate any problem with the '||
2909: 'FND_GLOBAL package itself. '||

Line 2907: 'This message indicates a problem in a previous call to FND_GLOBAL '||

2903: user_id || '. '||
2904: 'This message indicates that the context value set with the last ' ||
2905: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2906: 'later on in the session. '||
2907: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2908: 'initialization routines. It does not indicate any problem with the '||
2909: 'FND_GLOBAL package itself. '||
2910: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2911: 'message in a production environment.');

Line 2909: 'FND_GLOBAL package itself. '||

2905: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2906: 'later on in the session. '||
2907: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2908: 'initialization routines. It does not indicate any problem with the '||
2909: 'FND_GLOBAL package itself. '||
2910: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2911: 'message in a production environment.');
2912: end if;
2913:

Line 3032: * fnd_global.apps_initialize. Sets the module and action field of v$session.

3028:
3029:
3030: /* Overloaded procedure of tag_db_session. This is a PRIVATE API currently.
3031: * This api will be used by module_types which does not set any context using
3032: * fnd_global.apps_initialize. Sets the module and action field of v$session.
3033: *
3034: * module_type : type of program being called (always in lowercase)
3035: * appname : application name
3036: * module_name : The module name that performs the action

Line 3127: * context has been established via fnd_global.apps_initialize().

3123: end tag_db_session;
3124:
3125:
3126: /* Sets the module and action field of v$session. This API is used when a
3127: * context has been established via fnd_global.apps_initialize().
3128: * module_type : type of program/function/action being called (always in lowercase)
3129: * module_name : The module or code class name that performs the action.
3130: */
3131: procedure tag_db_session(

Line 3142: -- application_short_name, resp_key, and user_name are fnd_global functions

3138:
3139: begin
3140:
3141: -- call overloaded tag_db_session
3142: -- application_short_name, resp_key, and user_name are fnd_global functions
3143: tag_db_session( module_type=>module_type,
3144: appname=>l_app_short_name,
3145: module_name=>module_name,
3146: p_resp_appl=>l_app_short_name,

Line 3230: end fnd_global;

3226: z_syscontext('SUPPLIER_ID') := true;
3227: z_syscontext('USER_ID') := true;
3228: z_syscontext('USER_NAME') := true;
3229:
3230: end fnd_global;