Orcl: FND_PROFILE.VALUE('ORG_ID') yields no value, USERENV('CLIENT_INFO') gives value

raksrules

Elite
Oracle related issue

I am facing an issue while querying in toad

I tried using the following

Code:
SELECT fnd_profile.value('ORG_ID') from dual;
to get the org_id in TOAD/SQL PLus but it yields 0 everytime.

But when i use

Code:
SELECT USERENV('CLIENT_INFO') from dual;
it gives me the output as 291
I did the following before running the above queries

Code:
begin
   dbms_application_info.set_client_info('291');
end;

Please let me know whats the issue.
 
set_client_info is used to set the client info field of the session.
fnd_profile.value is used to retrieve the value of a profile option.

you might want to first invoke fnd_global.apps_initialize for your user/resp/app_id before querying the value for the org_id profile (MO: Operating Unit)
 
Back
Top