Search Results g_profile




Overview

OE_CREDIT_CHECK_PVT is a private PL/SQL package body in the APPS schema that implements the internal business logic for Oracle Order Management credit checking. It is invoked indirectly by the public credit checking APIs rather than being called directly by end users or external integrations. The package is central to evaluating whether a sales order or order line exceeds the credit exposure permitted for a customer, thereby determining whether an order can be booked or must be placed on credit hold. Its designation as a "PVT" (private) API classification reflects that its procedures are intended for internal consumption by other credit checking components within the Order Management module rather than as a supported extension point.

At the top of the body, the package declares constants such as G_PKG_NAME and initializes G_ORG_ID using mo_global.get_current_org_id, reflecting Multi-Org Access Control (MOAC) support. It also reads the AR_CREDIT_LIMIT_SELECTION profile option into G_PROFILE, which governs how credit limits are selected or aggregated during evaluation.

Key Procedures and Functions

The package exposes four documented program units, all of which contribute to the credit exposure calculation and limit retrieval process:

  • GET_LIMIT_INFO — Retrieves the credit limit information applicable to a given customer or order context. This procedure supplies the ceiling against which current exposure is compared.
  • GET_USAGES — This is the procedure associated with the user search term "get_usages". It calculates or retrieves the current credit usage or exposure for a customer, forming the counterpart to the limit information. Together with GET_LIMIT_INFO, it provides the two inputs required to determine whether a transaction remains within the customer's authorized credit.
  • GET_ITEM_LIMIT — Returns the credit limit associated with individual items. The body declares a category-based temporary record and table type (item_category_id with a profile_exist flag), and delegates to OE_CREDIT_CHECK_UTIL.GET_Item_Limit, with debug output gated by oe_debug_pub.g_debug_level. This supports item-category-specific limit rules.
  • CURRENCY_LIST — Supports multi-currency credit checking by providing or validating the list of currencies involved, ensuring that limits and usages are compared on a consistent currency basis.

Debug instrumentation throughout uses the standard oe_debug_pub facility, enabling diagnostic tracing when debug levels are enabled.

Tables Accessed

The package accesses two tables through APPS synonyms:

  • HZ_CREDIT_PROFILE_AMTS — Stores credit profile amount information. This table is read to obtain credit limit amounts and related profile data used by GET_LIMIT_INFO and GET_USAGES.
  • PLITBLM — A standard Oracle EBS temporary/working table used to hold intermediate result sets during processing.

Usage Notes

OE_CREDIT_CHECK_PVT is not intended for direct invocation. It is called by the higher-level credit checking API surface during order entry and booking, typically triggered from the Sales Orders form (OEXOEORD) or through concurrent order import and processing flows. Because the package is a private body, customizations should target the supported public credit checking APIs rather than this package. The metadata indicates it is referenced by one other package, confirming its role as an internal dependency. When the AR_CREDIT_LIMIT_SELECTION profile option is configured, the package behavior adapts accordingly, so functional setup of that profile directly affects the results returned by GET_LIMIT_INFO and GET_USAGES.