ORACLE

ORACLE
Let us share our knowledge to the world of oracle apps. I am trying my best to do so and I request every one to contribute their part. If you have any thing useful related to oracle apps, do send me I will post in my blog on behalf of you. If you like my blog tell the world about it, else tell me i will improve. You can suggest me, what exactly you want on oracle apps. Mail your queries.

Wednesday, June 6, 2012

How to set org context in Oracle apps R12 and 11i

Set org context in R12
1.    The SQL command to set the ORG_ID prior to running a script is:
SQL> exec mo_global.init('AR');
exec mo_global.set_policy_context('S','&org_id');
2.    Enter the org_id when prompted.
The procedure - mo_global.set_policy_context has two parameters
p_access_mode & p_org_id




          p_org_id: Only applicable if p_access_mode is passed value of "S"

If using Toad
Begin
mo_global.set_policy_context(‘S’, &org_id);
End;

Set org context in 11i:

1.    The SQL command to set the ORG_ID prior to running a script is:
o    SQL> execute dbms_application_info.set_client_info(&org_id);
2.    Enter the org_id when prompted.
If using Toad
Begin
fnd_client_info.set_org_context(&org_id);
End;

No comments:

Post a Comment