Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Sunday, August 7, 2011

Oracle Multi Org(MOAC) Functions

MO_GLOBAL Package
MOAC functionality is provided through the MO_GLOBAL package (AFMOGBLB.pls). Following are some of the more important functions and procedures in the package.

Init() This is generally called by forms and reports to setup the list of orgs that can be accessed. It calls the set_org_access procedure, which in turn calls populate_orgs. This inserts the orgs a user is allowed to access in a global temporary table -- MO_GLOB_ORG_ACCESS_TMP. The table is populated based on the MO: Security Profile and MO: Operating Unit profile option values.

Org_security() This returns a sql predicate (where clause) that controls which records can be accessed.
Example:
EXISTS (SELECT 1
FROM mo_glob_org_access_tmp oa
WHERE oa.organization_id = org_id)
This is used in dbms_rls.add_policy to add the vpd security to synonyms.

Check_access() Checks to see if an org can be accessed by a user. If access mode is M (Multiple), see if the org_id is in mo_glob_org_access_tmp.

To Set Policy Context at VPD
Single-org:
Execute mo_global.set_policy_context('S',&org_id);

Multi-org:
Begin
FND_GLOBAL.apps_initialize(
l_user_id, -- User id
l_resp_id, -- Responsibility Id
200); -- Application Id
MO_GLOBAL.init('SQLAP');
End;

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect