Search Results p_orderby_cat




Overview

The APPS.PO_POXAGLST_XMLP_PKG package is the PL/SQL package body associated with the Oracle E-Business Suite concurrent program "POXAGLST" — the Purchasing Category Listing report (also referenced as the "Active/Inactive Category Listing" XML Publisher report). Its primary business function is to drive the runtime logic of that report: resolving user-supplied report parameters, building the category selection WHERE clause, and determining the ORDER BY clause that governs how category rows are sorted and displayed. The package is defined with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking user rather than the defining schema, and its header is dated 2008 with version 120.2.

The report serves procurement and category-management users who need to review the active or inactive status of purchasing categories, optionally filtered by location, category hierarchy range, and flexfield structure. The package carries a substantial set of package-level variables that mirror report parameters (for example P_ACTIVE_INACTIVE, P_LOCATION, P_FLEX_CAT, P_CATEGORY_FROM, P_CATEGORY_TO, P_WHERE_CAT, P_STRUCT_NUM, and the ORDER BY controls).

Key Procedures and Functions

  • BEFOREREPORT — Executed prior to report rendering. It performs the initialization work required to prepare the report, including populating the package variables, invoking structure resolution, and constructing the generated sort and filter expressions used by the report query.
  • AFTERREPORT — Executed after report completion. It performs any required cleanup or post-processing and returns control, typically returning a boolean to signal successful execution.
  • ORDERBY_CLAUSEFORMULA — A formula function returning a VARCHAR2 that assembles the ORDER BY clause. This is the core logic behind the P_ORDERBY_CAT and P_ORDERBY parameters: the package exposes separate ORDER BY controls for the category attribute and the displayed label (P_orderby_displayed / LP_ORDERBY_DISPLAYED), and this function translates the user's selection into a valid SQL sort expression. Because the report user searched for "p_orderby_cat," this function is the most relevant documented routine, as P_ORDERBY_CAT is the 298-character variable that holds the constructed category sort specification.
  • GET_P_STRUCT_NUM — Resolves and returns the flexfield structure number (P_STRUCT_NUM) required to interpret the category flexfield segments. It returns a boolean indicating success and is essential for the P_FLEX_CAT and category range parameters to function correctly.

Tables Accessed

The ETRM metadata for this release does not enumerate the base tables referenced through APPS synonyms. Functionally, the report logic resolves category flexfield structure information and category definitions from the standard Oracle Purchasing category flexfield and category code views, which supply the active/inactive status, category name, and structure context used to populate P_WHERE_CAT and the ORDER BY variables. No tables are documented explicitly in the supplied metadata, so table access is inferred from the report's purpose rather than confirmed.

Usage Notes

This package is invoked exclusively as the supporting PL/SQL logic for the POXAGLST concurrent program; it is not called by other documented packages (referenced-by count is zero). Users run it from the Submit Requests form or the concurrent manager, supplying parameters such as location, category range, flexfield structure, active/inactive flag, and the two ORDER BY selections. The BeforeReport and AfterReport functions are wired into the report's trigger points, while ORDERBY_CLAUSEFORMULA and GET_P_STRUCT_NUM act as report-level formula and resolution functions. Because the package is declared AUTHID CURRENT_USER, custom or diagnostic callers must ensure the calling user holds sufficient privileges on the underlying category objects. Any modification should be treated as an upgrade-sensitive customization, as the package header identifies it as a seeded Oracle object.