Setting Org Context in Oracle Apps
METHOD 1:
begin
MO_GLOBAL.SET_POLICY_CONTEXT(ACCESS_MODE,ORG_ID);
end;
Example:
begin
MO_GLOBAL.SET_POLICY_CONTEXT(‘S’,101);
end;
S – Denotes that the current session will work for Single Org_id (101)
M – Denotes that the current session will work for Multiple Org_id
begin
mo_global.init (<APPLICATION SHORT NAME>);
end;
Example :
begin
mo_global.init (‘AR’);
end;
Query :
from fnd_application fapp,
fnd_application_tl fappt
where fapp.APPLICATION_ID = fappt.application_id
and fappt.language = ‘US’
and application_name = ‘General Ledger’
Setting the Application Context :
METHOD 1:
begin
fnd_global.apps_initialize(p_user_id, p_resp_id, p_resp_appl_id);
end;
Example :
begin
fnd_global.APPS_INITIALIZE(200131258,20004,51710);
end;
fnd_global.APPS_INITIALIZE
end;
,application_id
,responsibility_name
from fnd_responsibility_tl
where upper(responsibility_name) IN ( upper(‘Receivables Manager’), upper(‘Application Developer’ ) )
and language = ‘US’;
from fnd_user
where upper(user_name) = ‘SAIF’;
SELECT fnd_profile.value (‘RESP_ID’) FROM dual
SELECT fnd_profile.value (‘USER_ID’) FROM dual
SELECT fnd_profile.value (‘APPLICATION_ID’) FROM dual
SELECT TO_NUMBER (FND_PROFILE.VALUE( ‘LOGIN_ID ‘)) FROM dual
SELECT FND_PROFILE.VALUE(‘ORG_ID’) FROM dual
SELECT FND_PROFILE.VALUE(‘SO_ORGANIZATION_ID’) FROM dual
SELECT FND_PROFILE.VALUE(‘USERNAME’) FROM dual
SELECT FND_PROFILE.VALUE(‘GL_SET_OF_BKS_ID’) FROM dual
METHOD 2 :
begin
dbms_application_info.set_client_info(‘<org id>’);
end;
Example
begin
dbms_application_info.set_client_info(‘101’);
end;
Leave a Reply
Want to join the discussion?Feel free to contribute!