Search Results create_rule




Overview

OKC_XPRT_RULE_PUB is a public PL/SQL package in the Oracle E-Business Suite Contracts (OKC) module. It provides externally callable entry points for managing export rule data used by Oracle Contract Terms and Conditions (ETRM). The package exists solely as a thin public wrapper: each documented procedure immediately delegates to its counterpart in the private package OKC_XPRT_RULE_PVT and performs no business logic of its own.

This public/private pattern is standard in EBS APIs. The _PUB package defines the supported, stable interface exposed to external callers such as forms, concurrent programs, and custom extensions, insulating them from changes in the private implementation. The header comment ($Header: OKCPXIRB.pls 120.1 2011/03/10) confirms this file is shipped under the APPS schema in both 12.1.1 and 12.2.2. All procedures use IN OUT NOCOPY parameters for their table-type collections, a performance-conscious choice that avoids copying large PL/SQL collections during the delegated call.

Key Procedures and Functions

The ETRM metadata documents three procedures in this package body:

  • CREATE_RULE — Accepts a rule table collection (OKC_XPRT_RULE_PVT.RULE_TBL_TYPE) and an optional commit flag (p_commit, defaulting to FND_API.G_FALSE). It delegates to okc_xprt_rule_pvt.create_rule to insert new export rule records. Given the "create_rule" search term, this is the most frequently referenced procedure of the three.
  • UPDATE_RULE — Takes the same parameter shape as CREATE_RULE and delegates to okc_xprt_rule_pvt.update_rule to modify existing export rule definitions.
  • DELETE_RULE_CHILD_ENTITIES — Accepts a child-entity collection (OKC_XPRT_RULE_PVT.rule_child_entities_tbl_type) and a commit flag, delegating to okc_xprt_rule_pvt.delete_rule_child_entities to remove dependent child records associated with export rules.

Each procedure follows an identical defensive pattern: it calls the private API, and its exception handler consists only of WHEN OTHERS THEN RAISE;. This deliberately re-raises the original exception without translation, ensuring the underlying private API's error semantics propagate unchanged to the caller. None of the documented procedures declare exceptions, return values, or additional parameters.

Tables Accessed

The documented metadata does not list any tables referenced directly by OKC_XPRT_RULE_PUB. This is consistent with its architecture as a wrapper package: all SQL, DML, and table access is performed inside OKC_XPRT_RULE_PVT. The private API operates on the underlying OKC export-rule schema objects — rule definition tables and their associated child-entity tables — accessed through APPS synonyms. Any table-level diagnosis or tuning should be directed at the private package, where the actual inserts, updates, and deletes occur.

Usage Notes

The metadata records zero dependent packages, meaning no other shipped package references OKC_XPRT_RULE_PUB. Its callers are therefore external: ETRM setup forms, import/export-rule maintenance flows, and custom PL/SQL extensions that need to programmatically create, update, or delete export rules. When invoking it, callers should supply a properly populated rule collection, pass FND_API.G_TRUE for p_commit only when transaction control belongs to the caller's outer unit of work, and expect exceptions to surface directly from the private layer with no alteration by the public wrapper.