Search Results get_multi_org_flag




Overview

APPS.MO_UTILS is a shared PL/SQL utility package in Oracle E-Business Suite that centralizes common queries against Multi-Org and ledger configuration data. Its primary business purpose is to resolve the operating unit context of the current session and to translate between operating units, organizations, sets of books, and ledgers. Because Multi-Org security in EBS determines which inventory organizations, operating units, and ledgers a user may access, application code repeatedly needs consistent answers to questions such as "what is the default operating unit for this user?" and "which ledger is associated with this operating unit?" MO_UTILS encapsulates that logic so that forms, concurrent programs, and other PL/SQL units do not each reimplement it.

The package is declared AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the calling user, and it therefore relies on APPS synonyms and on the caller's security profile rather than on definer's rights. The header identifies the source as AFMOUTLS.pls, maintained by Oracle, with the current version dated 2012. ETRM classifies the package as API classification "OTHER" and records that it is referenced by 97 other packages, confirming its role as a widely reused infrastructure utility rather than an end-user-facing API.

Key Procedures and Functions

Eleven documented program units make up the package. The get_default_ou procedure, the object most frequently searched for, returns the default organization identifier, the default operating unit name, and a count of operating units available to the session. It is the standard mechanism by which callers discover the user's default operating unit when no explicit context has been supplied.

  • Get_Set_Of_Books_Name — returns the set of books name for a given operating unit.
  • Get_Set_Of_Books_Info — returns the set of books identifier and name for a given operating unit.
  • Get_Ledger_Name — returns the ledger name associated with an operating unit.
  • Get_Ledger_Info — returns the ledger identifier and name for an operating unit.
  • Get_Multi_Org_Flag — returns the value of the Multi-Org profile option, indicating whether Multi-Org is enabled.
  • get_default_ou — returns the default organization identifier, default operating unit name, and operating unit count.
  • get_child_tab_orgs — builds a SQL fragment listing the organizations accessible for a given table and predicate, supporting dynamic organization-restricted queries.
  • get_default_org_id — returns the default organization identifier as a number.
  • check_org_in_sp — validates whether an organization belongs to a given security profile and organization class.
  • check_ledger_in_sp — validates whether a ledger is included in the current security profile.
  • Get_Org_Name — returns the name of an organization from its identifier.

Tables Accessed

MO_UTILS reads from a defined set of tables through APPS synonyms. FND_PROFILE_OPTION_VALUES supplies the Multi-Org and related profile option settings that establish the session's operating unit context. GL_LEDGERS provides ledger identifiers and names, resolving the older sets-of-books concept to the ledger model. HR_ORGANIZATION_INFORMATION stores organization classification and operating unit attributes used to resolve names and classes. PER_ORGANIZATION_LIST and PER_SECURITY_PROFILES drive the security profile membership checks performed by check_org_in_sp and check_ledger_in_sp. MO_GLOB_ORG_ACCESS_TMP supports the dynamic organization list construction used by get_child_tab_orgs, and PLITBLM is used for string parsing of the generated lists. The package is read-oriented: it resolves context and validates access rather than maintaining transactional data.

Usage Notes

MO_UTILS is invoked at runtime by forms, concurrent programs, and custom PL/SQL that must determine or validate the operating unit, organization, or ledger context. Typical calls occur during form initialization, where the default operating unit is established before Multi-Org views return data, and in reporting or validation logic that must confirm an organization or ledger falls within the user's security profile. Because 97 packages reference it, care should be taken when modifying or extending behavior; the default operating unit semantics in particular influence a wide range of dependent code. Note that in EBS 12.1.1 and 12.2.2 the ledger-oriented functions coexist with the older set-of-books functions, so callers should select the appropriate variant for their release and data model.