Search Results okc_tag_pvt




Overview

OKC_TAG_PVT is a private PL/SQL package in the Oracle E-Business Suite Contracts (OKC) module. It belongs to the OKC_REPORT_TAG family of objects, which supports the setup and administration of report tags applied to contract documents. Report tags provide the mechanism by which contract clauses and templates are associated with reporting structures, allowing generated contract output to be organized, catalogued, and retrieved through the reporting framework. As a PVT-classified package, OKC_TAG_PVT is intended strictly for internal use by the OKC APIs and the generated multi-language table handlers; it is not exposed as a public API and should not be called directly by customer extensions. The package body contains a mix of hand-coded helper logic and generated code, evidenced by the source header comment markers "Start of hand code" and "End of hand code" as well as the standard Oracle error-handling constants G_UNEXPECTED_ERROR, G_SQLERRM_TOKEN, and G_SQLCODE_TOKEN. Its internal variable g_return_status initializes to OKC_API.G_RET_STS_SUCCESS, confirming that the package conforms to the standard OKC API return-status convention.

Key Procedures and Functions

The ETRM metadata documents five procedures in the package: ADD_LANGUAGE, INSERT_ROW, LOCK_ROW, UPDATE_ROW, and DELETE_ROW. In addition, the source excerpt reveals an undocumented helper function, get_seq_id, which is the object associated with the user's search.

  • get_seq_id — A private NUMBER function returning a unique numeric identifier. It derives its value by converting the output of sys_guid() through the helper okc_p_util.raw_to_number. Because the function is declared only in the package body, it is not callable from outside the package. Its purpose is to supply primary key values for the report tag entities without depending on a database sequence.
  • ADD_LANGUAGE — Propagates translated rows from the base language record into OKC_REPORT_TAG_TL for every installed language in FND_LANGUAGES that does not already have a translation. It is a standard Oracle multi-language table maintenance routine and is typically invoked from the language installation or translation-upload process rather than from user-facing code.
  • INSERT_ROW — Creates a new report tag definition, inserting the base row and any required translated rows.
  • LOCK_ROW — Obtains a row-level lock on a report tag record, providing pessimistic concurrency control during update and delete operations.
  • UPDATE_ROW — Modifies an existing report tag definition and, where applicable, its translated attributes.
  • DELETE_ROW — Removes a report tag definition and its associated translated rows.

The package also defines an internal procedure, validate_enabled_flag, which performs validation of the enabled indicator passed by the row-level operations. The documented five procedures share a common calling pattern using an x_return_status output parameter consistent with OKC_API.

Tables Accessed

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

  • OKC_REPORT_TAG_B — The base (language-independent) table holding report tag definitions; accessed by INSERT_ROW, UPDATE_ROW, DELETE_ROW, and LOCK_ROW.
  • OKC_REPORT_TAG_TL — The translation table storing language-specific meaning and source-language information; populated by ADD_LANGUAGE and maintained in tandem with the base row.
  • OKC_REPORT_XSL_B — Referenced in association with report tag definitions, linking tags to the XSL transformation content used when rendering contract output.
  • FND_LANGUAGES — Used by ADD_LANGUAGE to determine which installed languages require translated rows.

Usage Notes

OKC_TAG_PVT is invoked indirectly. The row-level procedures are called by the corresponding public OKC report tag API layer, which in turn is driven from the Contracts setup forms and from concurrent programs that maintain report tag definitions. The ADD_LANGUAGE procedure is invoked by the standard Oracle language installation and translation upload routines. The package is referenced by one other package in the ETRM inventory, confirming its role as a supporting implementation unit rather than an entry point. Because get_seq_id and the row procedures are private, custom code that requires report tag identifiers should obtain them through the public OKC API or query OKC_REPORT_TAG_B directly rather than attempting to call OKC_TAG_PVT.get_seq_id, which will fail with a PLS-00302 component-must-be-declared error. The use of sys_guid()-based number generation means identifiers are not sequential and should not be treated as meaningful ordering keys.