如果有多个组织 ID,如何在后端的 Oracle Apps R12 中设置组织上下文?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22372975/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set org context in Oracle Apps R12 in back-end in case of multiple org-id?
提问by Nikhil
I have executed the query for single org-id and it is working properly.
我已经执行了对单个 org-id 的查询,并且它工作正常。
begin mo_global.set_policy_context('S',204); end;
开始 mo_global.set_policy_context('S',204); 结尾;
But for multiple cases I executed the following queries but it is not working
但是对于多种情况,我执行了以下查询但它不起作用
begin mo_global.set_policy_context('M',204); end;
开始 mo_global.set_policy_context('M',204); 结尾;
Even I tried running this- begin mo_global.set_policy_context('M',null); end;
即使我尝试运行这个 - begin mo_global.set_policy_context('M',null); 结尾;
I just want to know the 2nd parameter in case of multiple org-id.
我只想知道在多个 org-id 的情况下的第二个参数。
回答by Andy Haack
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.
说明:mo_global.init 根据表 fnd_mo_product_init 检查 application_short_name 参数,并根据表的状态列决定进一步处理多个或单个组织逻辑。
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.
如果传递的 application_short_name 参数未在该表中注册,则 mo_global.init 将失败。Oracle 向 fnd_mo_product_init 添加了虚拟短名称“M”和“S”,以允许在没有真实应用程序名称的情况下调用过程。
回答by Mohd Javed
--Initialization of view
--初始化视图
mo_global.set_policy_context(S,org_id)
if we know the user id, rep id, and app_resp_id then we can use the below query
如果我们知道用户 id、rep id 和 app_resp_id 那么我们可以使用下面的查询
fnd_globa.apps_initialize(:p_user_id, :p_resp_id, :p_app_resp_id);
回答by Syed Waseem
Use exec MO_GLOBAL.INIT('Give Application name');
使用 exec MO_GLOBAL.INIT('Give Application name');