Search Results po_lookup_codes




Overview

PO_LOOKUP_CODES is a Purchasing-module view owned by the APPS schema in Oracle E-Business Suite 12.1.1 and 12.2.2. It presents the set of Oracle Purchasing lookup values that are relevant to the PO product, exposing them in a flattened, report-friendly structure. Technically the view projects rows from the FND_LOOKUP_VALUES table filtered to view application 201 (Oracle Purchasing) and to the language of the current session. Its role in EBS reporting and integration is to provide a stable, denormalized access point to Purchasing lookup codes without requiring callers to embed the FND_LOOKUP_VALUES filter predicates themselves.

The view also normalizes several structural differences in FND_LOOKUP_VALUES. A prominent example is the MEANING column, which is aliased as DISPLAYED_FIELD, and the mapping of the END_DATE_ACTIVE column to the INACTIVE_DATE column name used by the view's column list. The view additionally exposes a full set of descriptive-flexfield columns (ATTRIBUTE_CATEGORY through ATTRIBUTE15) so that consumers can retrieve lookup value attributes without joining to the base table.

Underlying Base Objects

Per the documented ETRM metadata, PO_LOOKUP_CODES is defined over two referenced objects: the FND_GLOBAL package and the FND_LOOKUP_VALUES synonym (which resolves to the APPS.FND_LOOKUP_VALUES table in the Oracle Application Object Library). FND_LOOKUP_VALUES is the repository of all lookup codes across the E-Business Suite, keyed primarily by LOOKUP_TYPE, LOOKUP_CODE, LANGUAGE, and VIEW_APPLICATION_ID.

The view text restricts results with three documented predicates. The LANGUAGE predicate is set to USERENV('LANG'), ensuring the returned MEANING and DESCRIPTION values match the caller's session language. The VIEW_APPLICATION_ID predicate is fixed to 201, which identifies Oracle Purchasing, so only lookup types belonging to the Purchasing application are returned. Finally, SECURITY_GROUP_ID is filtered through FND_GLOBAL.LOOKUP_SECURITY_GROUP, which applies the caller's lookup security group context. This function call, combined with the FND_GLOBAL package reference, means the view is session-sensitive and returns rows consistent with the invoking user's language and security profile.

Key Columns

  • LOOKUP_TYPE — the lookup category (for example, document type or approval status), used to group related codes.
  • LOOKUP_CODE — the stored code value that other Purchasing tables reference; the pair LOOKUP_TYPE/LOOKUP_CODE is the effective identifier.
  • DISPLAYED_FIELD — the user-facing meaning of the code, sourced from FND_LOOKUP_VALUES.MEANING and translated to the session language.
  • DESCRIPTION — additional descriptive text for the lookup value.
  • INACTIVE_DATE — the mapped form of END_DATE_ACTIVE, indicating when the lookup value ceases to be active.
  • ENABLED_FLAG — indicates whether the lookup value is enabled for use.
  • ATTRIBUTE_CATEGORY, ATTRIBUTE1–ATTRIBUTE15 — descriptive-flexfield attributes carried over from the base lookup table.
  • LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN, CREATION_DATE, CREATED_BY — standard audit columns for change tracking.
  • REQUEST_ID, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE — concurrent-program context columns, projected as NULL in the view text.

Common Use Cases and Queries

Typical usage includes presenting lookup meanings in reports, validating a code entered by a user, and populating selection lists in custom forms or integrations. Because the view already filters to Purchasing and to the caller's language and security context, reports can avoid re-implementing those predicates.

  • List all active codes for a given lookup type:
    SELECT lookup_code, displayed_field
    FROM   po_lookup_codes
    WHERE  lookup_type = 'DOCUMENT_TYPE'
    AND    enabled_flag = 'Y';
  • Resolve a single code to its display text:
    SELECT displayed_field
    FROM   po_lookup_codes
    WHERE  lookup_type = 'APPROVAL_STATUS'
    AND    lookup_code = 'APPROVED';
  • Validate that a code is currently active:
    SELECT COUNT(*)
    FROM   po_lookup_codes
    WHERE  lookup_type = :p_type
    AND    lookup_code = :p_code
    AND    enabled_flag = 'Y'
    AND    (inactive_date IS NULL OR inactive_date > SYSDATE);

Because the view depends on FND_GLOBAL for security group resolution, results reflect the language and lookup security group of the session. Consumers that require all languages or all applications must query FND_LOOKUP_VALUES directly instead of this view.