Search Results load_jtf_terr




Overview

OKI_LOAD_TERR_PVT is a private PL/SQL package in the APPS schema that supports Oracle E-Business Suite's Contract Intelligence / Entitlements (OKI/OKC) territory loading infrastructure. Its business purpose is to populate and maintain the JTF territory tables (OKI_JTF_TERRITORIES and its staging counterpart) by deriving territory assignments from the underlying contract, party, and organization data held in the OKC and HR/HZ schemas. The package effectively bridges contract header, party role, and version number data with territory definitions, enabling downstream entitlement and coverage processing that depends on accurate territory membership.

The package carries the PVT (private) API classification, meaning it is an internal implementation package not intended as a public integration point. It is supported and valid in both EBS 12.1.1 and 12.2.2, and depends on SYS.STANDARD as its only listed external dependency at the package level. It is referenced by no other documented packages, confirming its role as a leaf-level worker package invoked by concurrent processing rather than by other PL/SQL APIs.

Key Procedures and Functions

The ETRM metadata documents four procedures:

  • INITIAL_LOAD — Performs the full (first-time) load of territory data. It is the entry point for seeding the territory tables from the complete set of qualifying contract and party records.
  • INCR_LOAD — Performs an incremental load, processing only records changed since the prior load cycle. This supports ongoing synchronization without rebuilding the full territory set.
  • WORKER — The internal worker routine that performs the row-level processing for territories. Both INITIAL_LOAD and INCR_LOAD delegate the bulk of their work to WORKER, consistent with the standard worker/manager concurrency pattern used across EBS batch infrastructure.
  • LOAD_JTF_TERR — Loads the JTF territory records themselves, transferring staged territory rows into the target territory table used by JTF-based territory functionality.

No parameter lists are documented, and none are assumed here.

Tables Accessed

The package references the following objects via APPS synonyms:

  • OKC_K_HEADERS_ALL_B — contract headers, the primary source of contracts that participate in territory derivation.
  • OKC_K_PARTY_ROLES_B and OKC_K_VERS_NUMBERS — contract party roles and version numbers, used to resolve the parties associated with each contract.
  • OKC_STATUSES_B — contract status lookup, used to filter to active/qualifying contracts.
  • HZ_PARTIES — party master data, supplying the party identifiers tied to territories.
  • HR_ALL_ORGANIZATION_UNITS — organization unit definitions used for organizational territory mapping.
  • OKI_JTF_TERRITORIES_STG — the staging table where derived territory rows are assembled before promotion.
  • OKI_JTF_TERRITORIES — the target territory table populated by the load.
  • OKI_DBI_WORKER_STATUS — worker tracking table recording batch progress and status.
  • DBMS_LOCK — used to serialize concurrent load invocations.
  • PLITBLM — PL/SQL table management utility used for in-memory collections during processing.

Usage Notes

OKI_LOAD_TERR_PVT is a private package and is not part of the supported public API surface. It is normally invoked indirectly, typically from a concurrent program or a higher-level manager process that drives INITIAL_LOAD for a full refresh or INCR_LOAD for periodic incremental synchronization. The WORKER procedure is called internally by those entry points and is not intended for direct invocation. Because the package acquires locks via DBMS_LOCK and writes worker status into OKI_DBI_WORKER_STATUS, concurrent execution against the same territory set should be avoided. Custom code should not call this package directly; integrations requiring territory data should consume the resulting OKI_JTF_TERRITORIES records instead.