Search Results add_attachments_automatic
Overview
APPS.OE_FND_ATTACHMENTS_PVT is a private PL/SQL package within the Oracle Order Management (OE) module of Oracle E-Business Suite. Its role is to manage the automatic creation, insertion, and removal of attachments against Order Management entities by interpreting and evaluating attachment addition rules defined on those entities. Rather than requiring users to attach documents manually, the package programmatically inspects the rules configured for a given entity and applies qualifying documents as attachments, returning a count of the attachments that were processed. The package header carries the version string OEXVATTS.pls 120.0.12010000.1, dated 2008/07/25, indicating a long-standing, stable utility component shipped with the 12.1.1 and 12.2.2 code lines.
The package is classified as PVT (private), meaning it is not intended to be called directly by external integrations or end users. Instead, it acts as a supporting engine consumed by other OE packages and by the Order Management forms infrastructure, exposing a small, well-defined set of utility APIs that centralize the logic of "auto attachment" behavior.
Key Procedures and Functions
The ETRM metadata documents three procedures, all classified as Utility type at version 1.0:
- ADD_ATTACHMENT — Adds a single document as an attachment to a specified entity and primary key combination. The user search string "add_attachment" maps directly to this procedure. It is the core primitive used when one document must be linked to an OE entity.
- ADD_ATTACHMENTS_AUTOMATIC — Evaluates all attachment addition rules defined on the supplied entity name (
p_entity_name) and its primary key values (p_pk1_valuethroughp_pk5_value), then attaches every document that qualifies under those rules. The count of documents attached is returned in the out parameterx_attachment_count. The API follows the standard EBS PL/SQL interface convention withp_api_version, ap_commitflag defaulting toFND_API.G_FALSE, and the standardx_return_status,x_msg_count, andx_msg_dataoutputs. This is the primary entry point for automated attachment roll-forward behavior. - DELETE_ATTACHMENTS — Removes attachments previously associated with an entity, providing the inverse operation used during cleanup, rollback, or re-evaluation of attachment rules.
The package header also declares two PL/SQL record and table types, Attachment_Rule_Rec_Type and Attachment_Rule_Tbl_Type, which model a single attachment addition rule (document_id, group_number, attribute_code, column_name, data_type, inclusion flags, required_value, actual_value, rule_valid) and a collection of such rules. These types support internal evaluation of rule sets before attachment insertion.
Tables Accessed
The package references the following tables through APPS synonyms:
- FND_ATTACHED_DOCUMENTS and FND_ATTACHED_DOCUMENTS_S — the core EBS attachment link tables that store the association between a document and its owning entity/primary key. These are the primary write targets for ADD_ATTACHMENT and ADD_ATTACHMENTS_AUTOMATIC and the delete targets for DELETE_ATTACHMENTS.
- FND_DOCUMENTS — holds document metadata; read to identify qualifying documents during automatic rule evaluation.
- FND_DOCUMENT_ENTITIES — defines which entities support attachments; used to validate the target entity before processing.
- AK_ATTRIBUTES, AK_OBJECT_ATTRIBUTES, OE_AK_OBJECTS_EXT, and OE_AK_OBJ_ATTR_EXT — the Oracle Application Object Library attribute and object-attribute views used by the rule engine to resolve entity attributes and their data types when evaluating addition rules.
- DBMS_SQL and DUAL —
DBMS_SQLis used for dynamically constructed SQL that evaluates attachment rules against entity attributes;DUALsupports scalar lookups and validation. - PLITBLM — the PL/SQL table-to-string buffer utility used to package rule collections for dynamic processing.
Usage Notes
Because this is a private package, it is not documented for direct customer invocation. In practice it is called from Order Management forms logic and from other OE packages (the metadata notes two packages reference it) to enforce attachment rules when an order, line, or other OE entity is created, updated, or saved. Custom code that wishes to reproduce auto-attachment behavior should call the public OE attachment APIs rather than this PVT package directly. When the package is invoked, the caller must supply the correct entity name and primary key values, observe the x_return_status output for error handling, and decide whether to set p_commit to TRUE or manage the transaction boundary itself. The "add_attachment" search term most commonly leads users here when they are investigating why a document did not attach automatically, or when building an integration that needs to trigger the same attachment rules programmatically.
-
PACKAGE: APPS.OE_FND_ATTACHMENTS_PVT
12.1.1
-
PACKAGE: APPS.OE_FND_ATTACHMENTS_PVT
12.2.2
-
PACKAGE: APPS.OE_FND_ATTACHMENTS_PUB
12.1.1
-
PACKAGE: APPS.OE_FND_ATTACHMENTS_PUB
12.2.2
-
PACKAGE BODY: APPS.OE_FND_ATTACHMENTS_PVT
12.1.1
-
PACKAGE BODY: APPS.OE_FND_ATTACHMENTS_PVT
12.2.2
-
PACKAGE BODY: APPS.OE_FND_ATTACHMENTS_PUB
12.2.2
-
PACKAGE BODY: APPS.OE_FND_ATTACHMENTS_PUB
12.1.1
-
APPS.OE_FND_ATTACHMENTS_PVT dependencies on OE_MSG_PUB
12.2.2
-
APPS.OE_FND_ATTACHMENTS_PVT dependencies on OE_MSG_PUB
12.1.1
-
APPS.OE_FND_ATTACHMENTS_PUB dependencies on FND_MSG_PUB
12.2.2
-
APPS.OE_FND_ATTACHMENTS_PUB dependencies on FND_MSG_PUB
12.1.1
-
APPS.OE_FND_ATTACHMENTS_PUB dependencies on FND_API
12.2.2
-
APPS.OE_FND_ATTACHMENTS_PUB dependencies on FND_API
12.1.1