How to set org context in Oracle Apps R12 in back-end in case of multiple org-id?

Nikhil picture Nikhil · Mar 13, 2014 · Viewed 94.2k times · Source

I have executed the query for single org-id and it is working properly.

begin mo_global.set_policy_context('S',204); end;

But for multiple cases I executed the following queries but it is not working

begin mo_global.set_policy_context('M',204); end;

Even I tried running this- begin mo_global.set_policy_context('M',null); end;

I just want to know the 2nd parameter in case of multiple org-id.

Answer

Andy Haack picture Andy Haack · May 26, 2016

a simple and failsafe call for multiple org init is:

exec mo_global.init('M');

and for single:

exec mo_global.init('S');

Explanation: mo_global.init checks the application_short_name parameter against table fnd_mo_product_init and decides by the table's status column to proceed further with multiple or single org logic.

If the application_short_name parameter passed is not registered in that table, mo_global.init will fail. Oracle added the dummy short names 'M' and 'S' to fnd_mo_product_init to allow calling the procedure without a real apps name.