Search Results pmisa_get_charge




Overview

APPS.PMI_SALES_PKG is a PL/SQL package in Oracle E-Business Suite that supports sales analysis and profitability reporting within the Process Manufacturing (OPM) and Order Management reporting domain. Its primary business purpose is to derive ranked sales metrics — top customers and top items — based on margin generated over a specified period, and to calculate charge amounts associated with sales orders. The package operates with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema, which is a standard construct for shared APPS-tier packages that must obey caller-based security context.

The package header, whose revision history dates to the 11.5.5 source line (PMISAANS.pls), exposes package-level variables that cache the parameters of the last Top-N computation so that repeated calls with identical inputs can avoid redundant processing. These cached variables record the sales organization, cost method, period start and end dates, and the Top-N count, and the package maintains separate variable sets for Top-N products and Top-N customers, including distinct sets for operating-unit-level Order Management sales organizations (OMSO). In the 12.1.1 and 12.2.2 documentation set it is classified as a general-purpose (OTHER) API rather than a formal Open Interface or public API.

Key Procedures and Functions

The documented interface comprises seven procedures and functions:

  • PMISA_GET_TOP_N — Calculates and returns the Top-N list of customers or items based on margin, grouping by organization and by item or customer for a given period. Results are populated into a PL/SQL package table that is referenced when subsequent calls pass the same parameters.
  • PMISA_GET_TOP_N_BY_OU — Provides the equivalent Top-N computation for operating-unit-level sales organizations, using the OU-specific cached variables (operating unit identifier, cost method, period dates, and Top-N count).
  • PMISA_VALIDATE_DATE — Validates date input, typically the period start and end dates, before the Top-N or charge processing logic is executed.
  • PMISA_GET_CHARGE — Retrieves or computes charge amounts applicable to sales order transactions, drawing on the charge master and order charge tables. This is the function most directly associated with the user search term pmisa_get_charge.
  • PMIOM_GET_CHARGE — A companion charge-retrieval function associated with the Order Management side of the calculation, complementing PMISA_GET_CHARGE.

The documentation does not enumerate explicit parameter lists for these program units; the cached package variables indicate the conceptual inputs (sales organization, cost method, period start date, period end date, item or customer identifier, and Top-N count).

Tables Accessed

The package reads and processes data from a documented set of APPS synonyms spanning order capture, costing, and master data:

Usage Notes

PMI_SALES_PKG is classified as an OTHER API and is referenced by three other packages, indicating it is consumed primarily as an internal service layer rather than being called directly by end users. In typical EBS deployments it is invoked from OPM sales analysis forms, from concurrent programs that generate Top-N margin and charge reports, and from custom PL/SQL that requires ranked sales performance metrics. Because the package caches the last computation parameters in package variables, callers benefit from repeated invocations within the same session using identical sales organization, cost method, and period values. Any integration or custom code should pass dates that satisfy PMISA_VALIDATE_DATE and should treat the returned PL/SQL table as session-scoped; the cache is not persisted across database sessions.