Search Results check_psa_enabled_current_org
Overview
APPS.LNS_UTILITY_PUB is the central public utility package for the Oracle Loans (LNS) module in Oracle E-Business Suite 12.1.1 and 12.2.2. It provides a shared library of helper routines used throughout the Loans application to validate data, retrieve reference information, perform currency conversion, and expose the standard EBS audit-column context (WHO columns). Because it is classified as a PUB (public) API, its procedures are intended to be called from other Oracle Loans packages, from Oracle Forms, and from customer extensions.
The package is referenced by 38 other packages, which indicates that it is a foundational dependency for loan header processing, participant validation, and system option evaluation. The function the user searched for, check_psa_enabled_current_org, is one of two Public Sector Accounting (PSA) capability checks exposed by this package. It determines whether PSA processing is enabled for the organization in the current session, most likely by inspecting the LNS_SYSTEM_OPTIONS tables.
Key Procedures and Functions
- Audit-context functions — CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN, REQUEST_ID, PROGRAM_ID, PROGRAM_APPLICATION_ID, APPLICATION_ID, PROGRAM_UPDATE_DATE, and USER_ID return the standard WHO/concurrent-program context values. They are wrappers over FND_GLOBAL and FND_CONCURRENT context APIs and are used throughout Loans to populate and read audit columns.
- VALIDATE_ANY_ID — Generic validator that verifies whether a given numeric identifier exists in a named table and column. It centralizes existence checks used across Loans.
- VALIDATE_ANY_VARCHAR — Companion validator for character values, confirming that a supplied value exists in a specified table and column.
- VALIDATE_LOOKUP_CODE — Validates a lookup code against a lookup view (default LNS_LOOKUPS).
- GETOBJECTVERSION — Retrieves and confirms the object version number for a row identified by table name and primary key, supporting optimistic locking used by Loans APIs.
- GET_LOOKUP_MEANING — Returns the user-facing meaning of a lookup code given its lookup type and code.
- CONVERTAMOUNT and CONVERTRATE — Currency conversion utilities that convert an amount, and derive the applicable rate, using FND_CURRENCIES and related rate tables.
- CHECK_PSA_ENABLED_ORG and CHECK_PSA_ENABLED_CURRENT_ORG — Determine whether Public Sector Accounting is enabled for a specified organization, or for the organization associated with the current session.
Tables Accessed
The metadata documents access (through APPS synonyms) to several categories of tables. WHO-column and concurrent context functions read FND_USER, FND_APPLICATION, FND_CONCURRENT_PROGRAMS, and FND_CONCURRENT_REQUESTS. Currency functions read FND_CURRENCIES. Loans-specific logic reads and writes LNS_LOAN_HEADERS_ALL, LNS_PARTICIPANTS, LNS_SYSTEM_OPTIONS, and LNS_SYSTEM_OPTIONS_ALL. Party and resource validation routines reference HZ_PARTIES, HZ_RELATIONSHIPS, JTF_RS_RESOURCE_EXTNS, JTF_RS_ROLES_B, and JTF_RS_ROLE_RELATIONS, while ledger context is drawn from GL_LEDGERS. The CHECK_PSA_ENABLED routines are most consistent with a read of LNS_SYSTEM_OPTIONS_ALL, where PSA enablement flags are typically stored.
Usage Notes
LNS_UTILITY_PUB is not a standalone business transaction API; it is a utility layer. It is normally invoked from other Oracle Loans packages, from Loans forms such as the loan header and participant forms, from concurrent programs processing loan data, and from custom extensions that need consistent validation or currency conversion. For the specific query check_psa_enabled_current_org, callers can invoke this function and test the returned status to decide whether to route a loan through PSA-related logic. Because check_psa_enabled_current_org relies on the current session's organization context, invoking code should ensure that the session's org context is initialized before calling it in custom code.