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.32.12010000.5 2009/01/28 16:41:30 pdeluna ship $ */
3:
4: procedure dump_context;
5:

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

83: -- using debug_to_table.
84: debug_to_console boolean := false;
85:
86: -- NOTE: This will attempt to create a database table
87: -- named fnd_global_debug_table. Don't enable this
88: -- unless it's okay to create that table. The contents
89: -- may be security sensitive.
90: debug_to_table boolean := false;
91:

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

97: -- Bug 7685798
98: MOAC_context_change_attempt boolean := false;
99:
100: --
101: -- Enables logging to core logging for fnd_global if core logging is enabled.
102: -- It should be called from the primary public routines. For example,
103: -- initialize, and the set_nl* routines.
104: procedure check_logging
105: is

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

107: begin
108:
109: debug_to_core := fnd_core_log.enabled <> 'N';
110:
111: dest := upper(sys_context(FND_CONST.FND,'FND_GLOBAL_DEBUG_LOGGING'));
112: debug_to_console := dest like '%CONSOLE%';
113: debug_to_table := dest like '%TABLE%';
114:
115: -- enables debug output if a destination is enabled.

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

139: end check_logging;
140:
141: -- General purpose debugger. Will direct debugging based on
142: -- the debug_to_* flags above.
143: -- DO NOT use any fnd_global routines within this routine.
144: -- DO NOT call anything outside fnd_global except fnd_core_log.put.
145: procedure debugger(text varchar2)
146: is
147: pragma autonomous_transaction;

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

140:
141: -- General purpose debugger. Will direct debugging based on
142: -- the debug_to_* flags above.
143: -- DO NOT use any fnd_global routines within this routine.
144: -- DO NOT call anything outside fnd_global except fnd_core_log.put.
145: procedure debugger(text varchar2)
146: is
147: pragma autonomous_transaction;
148: begin

Line 171: 'create table fnd_global_debug_table (

167: -- session but it's probably not much worse than having to
168: -- verify the existence each time either.
169: begin
170: execute immediate
171: 'create table fnd_global_debug_table (
172: text varchar2(2000)
173: ,counter integer
174: ,when date
175: ,who integer)';

Line 183: 'insert into fnd_global_debug_table

179: end if;
180:
181: begin
182: execute immediate
183: 'insert into fnd_global_debug_table
184: values (:text,:debug_counter,sysdate,userenv(''sessionid''))'
185: using text,debug_counter;
186: commit;
187: exception

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

429: return false;
430:
431: exception
432: when others then
433: throw('fnd_global.put('||name||','||value||')',
434: sqlcode, dbms_utility.format_error_stack);
435: end put;
436:
437: -- same as put_nosys but disposes of the return value

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

1327: return false;
1328:
1329: exception
1330: when others then
1331: throw('fnd_global.set_nls.set_parameter('''||
1332: p_parameter||''','''||
1333: p_value||''')',
1334: sqlcode, dbms_utility.format_error_stack);
1335: end set_parameter;

Line 1426: throw('fnd_global.set_nls',

1422: end if;
1423:
1424: exception
1425: when others then
1426: throw('fnd_global.set_nls',
1427: sqlcode, dbms_utility.format_error_stack);
1428: end set_nls;
1429:
1430: -- legacy routine that simply calls through to set_nls.

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

1517: end if;
1518:
1519: exception
1520: when others then
1521: log('fnd_global.set_nls.13', sqlcode, dbms_utility.format_error_stack);
1522: end set_nls;
1523:
1524:
1525: --

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

1874:
1875: -- For R12, MO supports Multiple Organization Access Control (MOAC)
1876: -- which allows access to multiple operating units during a session.
1877: -- FND still requires an org_id context to set for FND_PROFILE via
1878: -- FND_GLOBAL.ORG_ID. Per guidance from MO Team, there are 3
1879: -- profiles to determine the ORG_ID to set at initialization:
1880: -- MO: Security Profile
1881: -- MO: Default Operating Unit
1882: -- MO: Operating Unit

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

1909: -- Bug 7109984
1910: -- If MO: Default Operating Unit returns a value, set it as
1911: -- the initial ORG_ID.
1912: -- Note: this would make the return value of
1913: -- FND_GLOBAL.ORG_ID not always equal to the return value of
1914: -- FND_PROFILE.value('ORG_ID') since FND_GLOBAL.ORG_ID refers
1915: -- to the org context while FND_PROFILE.value('ORG_ID')
1916: -- refers to the value of the profile option MO: Operating
1917: -- Unit which are not the same.

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

1910: -- If MO: Default Operating Unit returns a value, set it as
1911: -- the initial ORG_ID.
1912: -- Note: this would make the return value of
1913: -- FND_GLOBAL.ORG_ID not always equal to the return value of
1914: -- FND_PROFILE.value('ORG_ID') since FND_GLOBAL.ORG_ID refers
1915: -- to the org context while FND_PROFILE.value('ORG_ID')
1916: -- refers to the value of the profile option MO: Operating
1917: -- Unit which are not the same.
1918: if defined and (org_id <> v_org_id_s) then

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

1959: begin
1960: v_org_name := org_name;
1961: end;
1962: -- This synchronizes the org context with the client_info space such
1963: -- that FND_GLOBAL.ORG_ID = substrb(userenv('CLIENT_INFO'),1,10).
1964: fnd_client_info.set_org_context(org_id);
1965: -- Reset the transient profile option CURRENT_ORG_CONTEXT if the org
1966: -- context changes. Re-initialize the org context for FND_PROFILE.
1967: if fnd_release.major_version >= 12 then

Line 2048: -- the following relies on FND_GLOBAL.set_nls() being called when people

2044:
2045: -- Profiles must be properly initialized before fnd_number.initialize.
2046: --
2047: -- Bug 2489275 - Since ICX_DATE_FORMAT is not tied to NLS_DATE_FORMAT, and
2048: -- the following relies on FND_GLOBAL.set_nls() being called when people
2049: -- want to initialize FND_DATE and FND_NUMBER packages, FND_DATE has been
2050: -- removed from this conditional and we leave FND_NUMBER which should be NLS
2051: -- related.
2052: --

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

2116: if context_changed then
2117:
2118: -- Bug 2489275, FND_DATE.initialize will only be called with the
2119: -- ICX_DATE_FORMAT_MASK profile value if the profile value is NOT NULL
2120: -- and either this is the first time into FND_GLOBAL.initialize or there
2121: -- has been a real context change.
2122: declare
2123: -- This is declared as 240 simply because that is the maximum length of
2124: -- a profile value

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

2221: -- Just in case...
2222: if (dbms_sql.is_open(curs)) then
2223: dbms_sql.close_cursor(curs);
2224: end if;
2225: throw('fnd_global.initialize[fnd_init_sql]',
2226: sqlcode, dbms_utility.format_error_stack);
2227: end;
2228:
2229: --

Line 2368: log('fnd_global.set_security_group_id_context',

2364: begin
2365: initialize(FND_CONST.SECURITY_GROUP_ID, to_char(security_group_id));
2366: exception
2367: when others then
2368: log('fnd_global.set_security_group_id_context',
2369: sqlcode, dbms_utility.format_error_stack);
2370: end;
2371:
2372: --

Line 2449: session_id := fnd_global.session_id;

2445:
2446: -- mode_in since the only out variable can be obtained from a function
2447: initialize(FND_CONST.MODE_IN,v_nv);
2448:
2449: session_id := fnd_global.session_id;
2450:
2451: end initialize;
2452:
2453: --

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

2520: begin
2521:
2522: if (fnd_profile.value('FND_DEVELOPER_MODE') = 'Y') then
2523: raise_application_error(-20009,
2524: 'Developer error: FND_GLOBAL initialization potential side effects. '||
2525: 'Remove the call that initialized the context to resp_id: '||
2526: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2527: user_id || '. '||
2528: 'This message indicates that the context value set with the last ' ||

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

2525: 'Remove the call that initialized the context to resp_id: '||
2526: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2527: user_id || '. '||
2528: 'This message indicates that the context value set with the last ' ||
2529: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2530: 'later on in the session. '||
2531: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2532: 'initialization routines. It does not indicate any problem with the '||
2533: 'FND_GLOBAL package itself. '||

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

2527: user_id || '. '||
2528: 'This message indicates that the context value set with the last ' ||
2529: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2530: 'later on in the session. '||
2531: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2532: 'initialization routines. It does not indicate any problem with the '||
2533: 'FND_GLOBAL package itself. '||
2534: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2535: 'message in a production environment.');

Line 2533: 'FND_GLOBAL package itself. '||

2529: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2530: 'later on in the session. '||
2531: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2532: 'initialization routines. It does not indicate any problem with the '||
2533: 'FND_GLOBAL package itself. '||
2534: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2535: 'message in a production environment.');
2536: end if;
2537:

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

2538: initialize(z_backup);
2539:
2540: if(fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
2541: fnd_log.string(FND_LOG.LEVEL_EXCEPTION,
2542: 'oracle.apps.plsql.fnd_global.restore.changed ',
2543: 'Developer error: FND_GLOBAL initialization potential side effects. '||
2544: 'Remove the call that initialized the context to resp_id: '||
2545: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2546: user_id || '. '||

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

2539:
2540: if(fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
2541: fnd_log.string(FND_LOG.LEVEL_EXCEPTION,
2542: 'oracle.apps.plsql.fnd_global.restore.changed ',
2543: 'Developer error: FND_GLOBAL initialization potential side effects. '||
2544: 'Remove the call that initialized the context to resp_id: '||
2545: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2546: user_id || '. '||
2547: 'This message indicates that the context value set with the last ' ||

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

2544: 'Remove the call that initialized the context to resp_id: '||
2545: resp_id||' resp_appl_id: '||resp_appl_id||' user_id: '||
2546: user_id || '. '||
2547: 'This message indicates that the context value set with the last ' ||
2548: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2549: 'later on in the session. '||
2550: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2551: 'initialization routines. It does not indicate any problem with the '||
2552: 'FND_GLOBAL package itself. '||

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

2546: user_id || '. '||
2547: 'This message indicates that the context value set with the last ' ||
2548: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2549: 'later on in the session. '||
2550: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2551: 'initialization routines. It does not indicate any problem with the '||
2552: 'FND_GLOBAL package itself. '||
2553: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2554: 'message in a production environment.');

Line 2552: 'FND_GLOBAL package itself. '||

2548: 'FND_GLOBAL init call could unintentionally affect code running ' ||
2549: 'later on in the session. '||
2550: 'This message indicates a problem in a previous call to FND_GLOBAL '||
2551: 'initialization routines. It does not indicate any problem with the '||
2552: 'FND_GLOBAL package itself. '||
2553: 'Unset the FND_DEVELOPER_MODE profile if you are seeing this '||
2554: 'message in a production environment.');
2555: end if;
2556:

Line 2683: end fnd_global;

2679: z_syscontext('SUPPLIER_ID') := true;
2680: z_syscontext('USER_ID') := true;
2681: z_syscontext('USER_NAME') := true;
2682:
2683: end fnd_global;