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:
- OP_ORDR_DTL and OP_ORDR_HDR — the OPM sales order detail and header tables that form the primary source for margin-based ranking.
- OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL, OE_PRICE_ADJUSTMENTS, OE_SYSTEM_PARAMETERS_ALL — Order Management order, pricing adjustment, and system parameter data used for charge and order-level calculations.
- OP_CHRG_MST and OP_ORDR_CHG — charge master definitions and order charge lines supporting PMISA_GET_CHARGE and PMIOM_GET_CHARGE.
- CM_CMPT_DTL — cost method component details, supplying the cost method code referenced by the cached package variables.
- IC_ITEM_MST and MTL_SYSTEM_ITEMS — item master data for item-level grouping and identification.
- HZ_PARTIES — customer and party information for customer-level Top-N grouping.
- SY_ORGN_MST — sales organization master, providing the organization code used in ranking and caching.
- GL_PLCY_MST and IC_WHSE_MST — policy and warehouse master data referenced in the costing and organization context.
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.
-
PACKAGE: APPS.PMI_SALES_PKG
12.2.2
-
PACKAGE: APPS.PMI_SALES_PKG
12.1.1
-
PACKAGE BODY: APPS.PMI_SALES_PKG
12.1.1
-
PACKAGE BODY: APPS.PMI_SALES_PKG
12.2.2
-
APPS.PMI_SALES_PKG dependencies on OP_ORDR_DTL
12.1.1
-
APPS.PMI_SALES_PKG dependencies on OP_ORDR_DTL
12.2.2
-
APPS.PMI_SALES_PKG dependencies on OP_ORDR_DTL
12.1.1
-
APPS.PMI_SALES_PKG dependencies on OP_ORDR_DTL
12.2.2