Search Results fnd_attached_documents_s




Overview

The APPS.FND_ATTACHED_DOCUMENTS2_PKG package body is a core Oracle E-Business Suite attachment utility that provides the underlying programmatic logic for creating, copying, deleting, and managing attachments (documents) associated with application entities such as form records, concurrent requests, and business objects. In the Oracle EBS 12.1.1 and 12.2.2 release streams, this package operates in the APPS schema with a status of VALID and is classified under the ETRM metadata as an "OTHER" API type. It complements the well-known FND_ATTACHED_DOCUMENTS_PKG by offering an extended set of operations, most notably copy and delete functionality that is not fully covered by the primary attachment package.

Because the object is a PACKAGE BODY rather than a standalone procedure or function, it exposes a set of encapsulated routines whose logic depends on several foundational dictionary and document-storage tables. The package is a dependency of 134 other database objects, indicating that attachment-related behavior across the EBS data model relies heavily on its implementation. A common search term associated with this object is fnd_attached_documents_s, the sequence that governs primary key generation for the FND_ATTACHED_DOCUMENTS table and which the package body references during attachment inserts.

Key Procedures and Functions

The ETRM metadata documents three callable units within the package body. Parameter lists are intentionally not enumerated here; only documented purposes are described.

  • DELETE_ATTACHMENTS — Removes attachment records from the FND_ATTACHED_DOCUMENTS table and cleans up the associated document, media, and LOB records held in the FND_DOCUMENTS family of tables. This routine enforces referential cleanup so that orphaned document rows are not left behind after an attachment is detached from its entity.
  • COPY_ATTACHMENTS — Duplicates one or more existing attachments so they can be associated with a new or different entity. This is the distinct capability that separates the "2" variant of the package from the base attachment package, and it is frequently used when source records are cloned or when a business process requires the same supporting documents to be linked to multiple targets.

Because the documentation identifies only two named procedures among the three total callable units, the remaining unit is either an internal helper or a less-exposed routine whose name is not enumerated in the excerpt. The package body is self-referencing (FND_ATTACHED_DOCUMENTS2_PKG references itself), consistent with internal modular calls.

Tables Accessed

The package body reads and writes a well-defined set of attachment and document tables, all accessed through APPS synonyms:

  • FND_ATTACHED_DOCUMENTS — the primary table linking a document to its owning entity; inserted, updated, and deleted by the package.
  • FND_ATTACHED_DOCUMENTS_S — the sequence supplying unique identifiers for new attachment rows.
  • FND_DOCUMENTS — the master document record containing name, description, and category metadata.
  • FND_DOCUMENTS_TL — the translatable (language-specific) text for document names and descriptions.
  • FND_DOCUMENTS_SHORT_TEXT, FND_DOCUMENTS_LONG_TEXT, and FND_DOCUMENTS_LONG_RAW — storage tables for short text, long text, and binary (raw) document content respectively.
  • FND_LOBS — holds the large object locator for file-based or media attachments.

Collectively these tables allow the package to manage both metadata and physical content of attachments in one operation.

Usage Notes

FND_ATTACHED_DOCUMENTS2_PKG is typically invoked indirectly rather than called from end-user code. It is exercised through Oracle Forms attachment blocks, the Attachments framework in HTML-based EBS 12.2.x pages, and concurrent programs or workflows that need to copy or delete attachments in bulk. Given its dependency footprint of 134 objects, customizations should avoid modifying the package body and instead call its public procedures. Direct invocation from custom PL/SQL is supported when an application must reproduce attachments programmatically, but developers should rely on the documented DELETE_ATTACHMENTS and COPY_ATTACHMENTS entry points and must ensure the required FND_DOCUMENTS and FND_LOBS rows remain consistent. Because the package body depends on FND_DOCUMENTS_PKG, its behavior inherits the standard document validation and security rules enforced by that base package.