Search Results copy_contract_line




Overview

OKS_RENCPY_PVT is a private PL/SQL package in the Oracle E-Business Suite Service Contracts (OKS) and Contracts Core (OKC) schema, owned by APPS. Its name reflects its purpose: the renaming and copying of contract structures—"REN" for rename, "CPY" for copy. The package provides the internal engine that supports contract versioning and duplication workflows in Oracle Service Contracts, allowing users to create a new contract version or duplicate an existing contract while re-establishing the associated parties, lines, articles, rules, and transaction extensions on the target contract. It is classified as a private (PVT) package, meaning it is not part of the published API surface and is intended for consumption by other OKS/OKC packages and internal concurrent processes rather than by external callers. The package declares AUTHID CURRENT_USER and builds extensively on subtype definitions imported from OKC_CONTRACT_PUB, OKC_K_ARTICLE_PUB, OKC_CONDITIONS_PUB, OKC_CONTRACT_ITEM_PUB, OKC_CONTRACT_PARTY_PUB, OKC_CONTRACT_GROUP_PUB, and OKS_KLN_PVT, indicating that it operates on the standard Contracts Core record structures used across the OKC public APIs.

Key Procedures and Functions

The documented procedures mirror the atomic components of a contract that must be recreated when a contract is copied or versioned:

  • COPY_PARTY_ROLES — Writes the party role records (OKC_K_PARTY_ROLES_B) from the source contract onto the new target contract, preserving the roles held by each party. This is the procedure most directly associated with the "copy_party_roles" search term.
  • COPY_CONTRACT_LINE — Copies contract line records (OKC_K_LINES_B) and their associated item structures so the commercial content of the source contract is reproduced on the target.
  • COPY_ARTICLES — Duplicates the article and boilerplate assignments attached to a contract, together with their variables, so that the legal terms of the source contract carry forward.
  • COPY_RULES — Copies the rule or condition records that govern contract behavior, ensuring the target contract inherits the same processing rules.
  • CREATE_TRXN_EXTN — Creates the transaction extension records associated with the copy operation, linking the source and target contract context for the transaction.

The package does not expose parameter lists in the available metadata; callers should consult the packaged specification in the database for exact signatures.

Tables Accessed

The package reaches the underlying tables through APPS synonyms. Contract header and line structures are read and written via OKC_K_HEADERS_B, OKC_K_LINES_B, OKC_K_ITEMS, OKC_K_GROUPS_B, OKC_K_VERS_NUMBERS, OKC_LINE_STYLES_B, and OKC_K_PROCESSES. Party and contact data are handled through OKC_K_PARTY_ROLES_B and OKC_CONTACTS. Articles and their transaction records are handled through OKC_ARTICLE_TRANS, while the rule/governance records used by COPY_RULES are stored in OKC_GOVERNANCES. Customer information for parties is resolved through the Oracle Receivables/Trading Community tables HZ_CUST_ACCOUNTS_ALL, HZ_CUST_ACCT_SITES_ALL, and HZ_CUST_SITE_USES_ALL. Finally, FND_ATTACHED_DOCUMENTS is referenced to duplicate file attachments associated with the source contract.

Usage Notes

Because OKS_RENCPY_PVT is a private package, it is invoked indirectly. The primary entry points are the Oracle Service Contracts contract creation and versioning flows in the Service Contracts forms and related concurrent programs, which call this package after a new contract version or duplicate header has been established. In customizations and extensions, developers should generally call the public OKC and OKS APIs rather than OKS_RENCPY_PVT directly, since the private package carries no guarantee of interface stability across patches. The ETRM metadata records that the package is referenced by one other package within the APPS schema, confirming its role as an internal dependency of the broader contract copy framework. When troubleshooting contract duplication or versioning issues—particularly missing party roles, vanished articles, or lost attachments on a newly created version—this package and its COPY_PARTY_ROLES and related procedures are the appropriate objects to trace.