How to initialize org in Oracle E-Business Suite R12 and 11i

As an oracle technical developer a question to initialize org in Oracle E-Business Suite R12 and 11i is of foremost importance. The tasks that are assigned to them juggles mostly between Oracle E-Business Suite 11i and Oracle E-Business Suite R12. If you are working on Oracle E-Business Suite ERP you must have noticed that our mind often gets confused on how to initialize org in both versions. At the last moment Google becomes our savior (You can also bookmark this article of oraclemine.com if you want, I don’t know how many would do that though…:) ). Jokes apart, I will show you in simple manner how to initialize org in both Oracle E-Business Suite 11i and Oracle E-Business Suite R12.

Initialize Org in Oracle E-Business Suite R12 and 11i

In Oracle E-Business Suite R12

Before you run any script in R12, execute the below procedure to set the org:

SQL> exec mo_global.init(‘PO’);
SQL> exec mo_global.set_policy_context(‘S’, 100);

There are two parameters in mo_global.set_policy_context procedure: p_access_mode & p_org_id

Parameter1: p_access_mode (in above example, it is ‘S’)

  • ‘S’ will be used if you want current session to run queries in context of single org.

Syntax

Begin
 mo_global.set_policy_context(‘S’, 100);
End;
  • ‘M’ will be used if you want current session to run queries in context of multiple orgs.

Syntax

Begin
 mo_global.set_policy_context(‘M’);
End;

S = If you want current session to run queries in context of single org.
M = If you want current session to run queries in context of multiple orgs

Parameter2: p_org_id (in above example, it is 100)

It is nothing but the organization whose data you would like to access.

In Oracle E-Business Suite 11i

Before you run any script in 11i, execute the below procedure to set the org:

SQL> exec fnd_client_info.set_org_context(100);

There is only parameter in fnd_client_info.set_org_context procedure: p_org_id (org_id)

In above example it is 100.

I have not mentioned in detail how multi-org facility can be used awesomely in R12. You will get more information about it in another article, here I have focused just on initialization.

Did you enjoy this post? Then you can put comment below to appreciate us. Also you can subscribe here to stay updated on latest posts of OracleMine.com.

Hi I am Paras.

Thanks for stopping by at OracleMine.com. Speaking about my brief introduction, I work for a multinational organisation in Oracle related technologies. Being an avid blogger, I would like to inform you about my productivity and motivational blog XpressPlanet.com. Speaking of OracleMine.com, I will try my best to share knowledge on technologies in as simple and understandable manner as possible. You can also contribute your knowledge on OracleMine by writing to us at hioraclemine@gmail.com. Again I appreciate your visit. Hope to see you again and again!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.