Search Results attach_to_entity




Overview

APPS.GR_ATTACH_DOCUMENTS_PKG is a PL/SQL package that resides in the APPS schema and carries a VALID status in Oracle E-Business Suite 12.1.1 and 12.2.2. Its name places it in the "GR" (Oracle Grants) product family, and its purpose is to provide a programmatic mechanism for attaching documents to Grants-related entities. The package exposes a single documented procedure, ATTACH_TO_ENTITY, which encapsulates the logic required to associate a file, URL, or text document with a given business entity through the standard Oracle EBS Attachments framework (FND_ATTACHED_DOCUMENTS). Rather than requiring callers to manipulate the underlying FND document tables directly, GR_ATTACH_DOCUMENTS_PKG centralizes the attachment operation so that Grants modules can create, register, and link documents consistently. The package is classified as API type OTHER in the ETRM repository, and no other packages in the APPS schema reference it; it acts as a self-contained utility invoked by Grants forms, concurrent programs, or custom extensions.

Key Procedures and Functions

The documented API surface of GR_ATTACH_DOCUMENTS_PKG consists of one procedure:

  • ATTACH_TO_ENTITY — Attaches a document to a specified entity. This procedure is the entry point for creating an attachment record and linking it to the target Grants entity. Consistent with the ETRM documentation, only the procedure name and purpose are documented; parameter lists are not published here and should not be assumed. In practice, callers supply the entity identifier, the document details, and the descriptive metadata that identify which document category and which entity the file should be associated with. All insert and validation logic for the underlying FND_ATTACHED_DOCUMENTS, FND_ATTACHED_DOCUMENTS_S, FND_DOCUMENTS, and FND_DOCUMENT_CATEGORIES records is performed internally by this procedure.

Tables Accessed

The package reads from and writes to the following tables, resolved via APPS synonyms:

  • FND_ATTACHED_DOCUMENTS — the main association table linking a document to an entity; ATTACH_TO_ENTITY inserts and maintains rows here.
  • FND_ATTACHED_DOCUMENTS_S — the sequence/identifier table supporting the primary key generation for attachment rows.
  • FND_DOCUMENTS — stores the document itself (file reference, URL, or text).
  • FND_DOCUMENT_CATEGORIES — supplies the valid attachment categories used to classify the document.
  • MTL_PARAMETERS and MTL_SYSTEM_ITEMS — inventory master tables, indicating that attachments may be created against inventory items or that item information is validated during the attach operation.
  • DUAL — used for singleton SELECT statements (for example, sequence value retrieval or simple validations).

Usage Notes

GR_ATTACH_DOCUMENTS_PKG is typically invoked from Oracle Grants forms, from concurrent programs, or from custom PL/SQL that needs to lodge a document against a Grants entity. Because it wraps the FND Attachments APIs, it should be called instead of direct DML against the FND attachment tables. The package is not referenced by any other documented APPS package, so it is an application-facing entry point rather than a shared library. When migrating customizations or extensions between 12.1.1 and 12.2.2, the package signature and status remain unchanged, but developers should confirm that the Grants and FND Attachments schemas are fully patched, since ATTACH_TO_ENTITY depends on those underlying frameworks. For grants integration work, ATTACH_TO_ENTITY provides the supported, upgrade-safe path for programmatic document attachment.