Search Results icx_margin_web_ana_pkg




Overview

APPS.ICX_MARGIN_WEB_ANA_PKG is a PL/SQL package body in the Oracle E-Business Suite APPS schema that supports the iProcurement and Oracle Internet Commerce (ICX) margin analysis functionality. Its principal business purpose is to populate and query the margin analysis data structures used by web-based margin reporting and analysis, enabling organizations to evaluate sales margin performance at the item and transaction level. The package acts as the application-tier engine that builds temporary margin data, transfers it into the persistent analysis tables, and retrieves aggregated margin and sales figures for presentation in web (JSP/HTML) user interfaces.

The object is classified as OTHER in the ETRM API classification, meaning it is not a formally documented public API but rather an internal support package. Its status is VALID, and it resides in the APPS schema.

Key Procedures and Functions

Four documented program units are exposed by the package body:

  • BUILD_ICX_CST_MARGIN_TABLE — The core builder routine. It is responsible for constructing the working margin data set used by the web analysis screens, drawing source rows from the costing margin build structures and writing the results into the ICX margin analysis tables.
  • ICX_GET_TOTAL_MARGIN — Returns a total margin value, typically computed across the items or selection criteria supplied by the calling web page. It provides the headline margin figure displayed in the margin analysis report.
  • ICX_GET_TOTAL_SALES — Returns the total sales value corresponding to the same selection, allowing the UI to present sales, margin, and margin percentage side by side.
  • GET_ITEM_NUMBER — Resolves and returns an item number, using the key flexfield item view so that the descriptive, user-facing item identifier is available to the margin analysis output.

Parameter lists are not documented in the ETRM metadata and are therefore not reproduced here.

Tables Accessed

The package references the following objects through APPS synonyms:

  • CST_MARGIN_BUILD — The costing margin build table, which holds staged margin calculation input and intermediate results processed during the build routine.
  • CST_MARGIN_TEMP — A temporary margin work table used to hold transient margin rows during processing before final transfer.
  • ICX_MARGIN_ANALYSIS — The primary web margin analysis table, where the built margin rows are stored for retrieval by the analysis screens.
  • ICX_MARGIN_ANALYSIS_ERR — The error table capturing rows that failed validation or processing during the margin build, supporting diagnostics and reconciliation.
  • MTL_SYSTEM_ITEMS_KFV — The item key flexfield view, used by GET_ITEM_NUMBER to resolve the concatenated item number for reporting.

Standard and SYS dependencies, together with the package's own self-reference, are also recorded in the dependency list.

Usage Notes

ICX_MARGIN_WEB_ANA_PKG is invoked from the web-based margin analysis pages within iProcurement and related ICX modules, where it is called to refresh the analysis tables and to supply aggregate margin and sales figures to the rendered page. The build routine is typically executed before the analysis screens are queried, either through the page flow or through scheduled/periodic processing, while the getter functions are called on demand to return totals. Because the package is referenced by thirteen other database objects, changes to it can propagate widely, and any customization or debugging should account for those dependents. It is not a supported public API; implementers should treat it as internal implementation and avoid direct calls from custom code where a supported alternative exists. All referenced objects are accessed through APPS synonyms, consistent with standard EBS schema sharing under the APPS account.