Search Results check_credit




Overview

The APPS.OE_CREDIT_ENGINE_GRP package is the core PL/SQL group responsible for the Oracle Order Management credit checking engine. Its primary business function is to retrieve credit exposure and rule data for a customer or a specific customer site, including support for multi-currency environments, and to evaluate that data against credit check rules in order to determine whether an order may proceed or must be placed on hold.

The package header (source OEXPCRGS.pls) documents that it "supports the main credit check engine in retrieving credit data" for a customer or site, with explicit multi-currency enhancements. The public globals declared in the specification — G_cust_curr_tbl, G_site_curr_tbl, G_cust_incl_all_flag, G_site_incl_all_flag, GL_CURRENCY, G_currency_error_msg, G_delayed_request, G_cc_hold_item_type, and G_cc_hold_activity_name — confirm that the package caches currency-level exposure information and activity-specific hold definitions for downstream consumption. These globals support inclusion/exclusion ("incl all") logic, delayed request handling, and the creation of activity-scoped credit holds.

Key Procedures and Functions

The documented API surface of this package comprises seven procedures and functions, classified as a GRP (group) package. It is referenced by thirteen other packages, reflecting its central role in the credit checking call chain.

  • CHECK_CREDIT — The principal credit evaluation entry point. Invoked to assess a customer's or site's credit standing against defined credit check rules and determine whether credit is exceeded.
  • CREDIT_CHECK_WITH_PAYMENT_TYP — Performs credit checking while accounting for a specified payment type, allowing the evaluation to consider payment-specific tolerance or rule behavior.
  • GET_CUSTOMER_EXPOSURE — Retrieves the current credit exposure for a customer or site, populating the public currency tables (G_cust_curr_tbl, G_site_curr_tbl) that hold exposure by currency. This functionality was added in August 2001 per the package history.
  • CREDIT_TOLERANCE_CHECK — Evaluates credit against configured tolerances, determining whether the exposure amount falls within acceptable limits.
  • IS_TOLERANCE_ENABLED — Returns whether tolerance checking is active for the given context, governing whether tolerance-based logic applies.
  • SET_CONTEXT — Establishes the runtime context required for credit rules and exposure queries to execute correctly.

The grouping of these routines allows the engine to first resolve context and tolerance configuration, retrieve exposure, and then apply rule and tolerance checks in sequence.

Tables Accessed

The package reads and writes the following documented tables through APPS synonyms:

  • OE_ORDER_HEADERS and OE_ORDER_HOLDS — Order header credit attributes and the holds applied or released as a result of credit evaluation.
  • OE_HOLD_DEFINITIONS, OE_HOLD_SOURCES_ALL, and OE_HOLD_RELEASES — Hold definition metadata, hold source configuration, and hold release processing used when credit holds are created together with activity-specific hold information stored in G_cc_hold_item_type and G_cc_hold_activity_name.
  • HZ_CUST_SITE_USES_ALL — Customer site usage information, including credit-related site attributes.
  • OE_CREDIT_CHECK_RULES — The rule definitions against which credit checks are evaluated.
  • PLITBLM — Supporting table access consistent with engine-driven processing.

Usage Notes

OE_CREDIT_ENGINE_GRP is not typically invoked directly by end users. It is called by the Order Management credit checking workflow, including the order entry forms and concurrent programs that execute credit checking during order booking or order entry, and by the thirteen dependent packages that invoke its routines as part of the broader credit check engine. Custom code that needs to reproduce credit checking behavior should call CHECK_CREDIT or GET_CUSTOMER_EXPOSURE rather than querying the underlying tables directly. Because the specification was last modified in the 12.1.1 lineage ($Header: OEXPCRGS.pls 120.1.12010000.1), the interface remains compatible in 12.2.2, where the package is catalogued as ETRM GRP with the same seven documented entry points. The SET_CONTEXT routine should be called before exposure or rule evaluation to ensure appropriate context is established, and callers should respect the exposed globals as the package's supported channel for currency-level and activity-hold information rather than relying on internal state.