Search Results c_tot_order_limit_p
Overview
ONT_OEXOECCH_XMLP_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and declared with AUTHID CURRENT_USER. It is the supporting database-side package for the Oracle Order Management credit checking report commonly associated with the "Order Credit Check" or customer credit exposure XML Publisher/Report output (the OEXOECCH naming convention reflects an Order Entry report generated through the XML Publisher reporting engine). The package exists primarily to supply report parameters, hold-derived values, and computed credit amounts to the report layout, and to control report execution flow through the standard Oracle Reports before/after triggers.
The package encapsulates the business logic required to determine whether a customer has exceeded defined credit limits, aggregating uninvoiced order values, receivable balances, and order-limit exposure across shipping, picking, packing, and credit-check dimensions. Static package-level variables such as P_CONC_REQUEST_ID, P_SOB_ID, P_ORDER_NUMBER, P_CUSTOMER_NAME, P_DATE_HOLD_APPLIED_LOW/HIGH, and the many LP_/RP_ prefixed variables hold report parameters and derived display values used by the report's data model and layout.
Key Procedures and Functions
The package exposes 34 documented program units. The core report trigger functions are:
- BEFOREREPORT — initializes the report execution, populating default parameter and display variables prior to data retrieval.
- AFTERREPORT — performs post-report cleanup and finalization.
- AFTERPFORM — runs after the parameter form is submitted, resolving dependent values before the main query executes.
- C_COMPUTE_AMOUNTSFORMULA — the central credit computation function. It receives site-use, currency, customer, and open-AR/entry/ship aging parameters along with entry/ship uninvoiced and on-hold flags, and returns the computed credit amounts used throughout the report.
- C_DATA_NOT_FOUNDFORMULA — determines the "no data found" indicator controlling report messaging.
- C_ADDRESSFORMULA — assembles the formatted customer address for output.
- C_DAYS_ON_HOLD_CRFORMULA and C_DAYS_ON_HOLD_CUFORMULA — compute the number of days an order or credit line has remained on hold.
The remaining documented functions, including C_UNINV_ORD_SHIP_P, C_UNINV_ORD_CREDIT_P, C_REC_BAL_SHIP_P, C_REC_BAL_CREDIT_P, C_TOT_ORDER_LIMIT_P, C_ORDER_LIMIT_P, C_REC_BAL_PICK_P, C_REC_BAL_PACK_P, C_UNINV_ORD_PICK_P, C_UNINV_ORD_PACK_P, RP_REPORT_NAME_P, and RP_SUB_TITLE_P, are parameter/placeholder or helper functions that compute or expose specific report values (uninvoiced orders, receivable balances, order limits by ship/pick/pack stage, and report headings).
Tables Accessed
The package reads credit, order, and customer data through APPS synonyms, including:
- OE_ORDER_HEADERS, OE_ORDER_HOLDS, OE_CREDIT_CHECK_RULES — order data, hold status, and credit checking rule configuration.
- AR_CASH_RECEIPTS, AR_CASH_RECEIPT_HISTORY, AR_PAYMENT_SCHEDULES — receivable and payment balance information used in credit exposure calculations.
- HZ_CUSTOMER_PROFILES, HZ_CUST_PROFILE_AMTS, HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES_ALL, HZ_LOCATIONS, HZ_LOC_ASSIGNMENTS, HZ_PARTY_SITES — customer profile, credit limit amounts, site use, and address data.
- FND_CONCURRENT_REQUESTS, FND_CURRENCIES — concurrent request context and currency definitions.
No INSERT/UPDATE activity is implied by the documented metadata; the package is fundamentally a query/report-support artifact.
Usage Notes
ONT_OEXOECCH_XMLP_PKG is referenced by the Oracle Reports/XML Publisher report definition rather than by other PL/SQL packages (documented as referenced by zero packages). It is invoked when the credit check report concurrent program is submitted, with the report's formula columns and user parameters calling the C_*FORMULA functions and the BEFOREREPORT/AFTERREPORT triggers firing at execution boundaries. The AUTHID CURRENT_USER declaration means execution privileges depend on the invoking schema, typically APPS during concurrent processing. Customizations should avoid direct calls to the C_*FORMULA helpers, as their signatures are designed for the report's internal data model and are not intended as a public credit-check API.