Search Results get_attachment_name
Overview
AMS_CPYUTILITY_PVT is a private (PVT) PL/SQL package in the Oracle Marketing (AMS) module of Oracle E-Business Suite, owned by the APPS schema and defined with AUTHID CURRENT_USER. It supplies the shared utility layer that supports the copy functionality across Oracle Marketing entities. When a marketing activity such as a promotion, campaign, channel, or event — or a marketing element such as a product, script, resource, or cell — is duplicated, this package generates the unique codes and resolves the display names required for the new records.
The package header comment traces its origin to July 1999 (created by Mumu Pande), with later revisions adding column-copy data types in April 2001. The source header indicates version 115.10. In EBS 12.1.1 and 12.2.2, the package remains an internal dependency: it is referenced by 23 other packages according to ETRM metadata, confirming its role as a low-level service used by the public copy APIs rather than by end users directly.
Key Procedures and Functions
The documented interface contains 19 procedures and functions organized into three functional groups.
- Name resolution (GET_* functions): GET_OFFER_CODE, GET_EVENT_OFFER_NAME, GET_EVENT_HEADER_NAME, GET_GEO_AREA_NAME, GET_PRODUCT_NAME, GET_MESSAGE_NAME, GET_SCRIPT_NAME, GET_RESOURCE_NAME, GET_ATTACHMENT_NAME, GET_CATEGORY_NAME, GET_DELIVERABLE_NAME, and GET_SEGMENT_NAME. Each returns the descriptive name for an entity given its identifier, so that copy operations can report meaningful errors and default values instead of raw IDs. GET_EVENT_HEADER_NAME, the user-requested entry, resolves the header name for an event so the copied event object can be properly labeled.
- Logging utilities: WRITE_LOG_MESG, REFRESH_LOG_MESG, and INSERT_LOG_MESG. These manage the activity log records generated during copy processing, writing and refreshing diagnostic messages against a copy run.
- Copy support helpers: GET_DATES, GET_COLUMN_VALUE, IS_COPY_ATTRIBUTE, and CHECK_ATTRIB_EXISTS. These determine effective dates, retrieve individual column values, and test whether a given attribute participates in the copy and whether the attribute already exists, enabling the generic column-mapping logic used by the copy engine.
The specification also declares code-generation functions (new_channel_code, new_media_code, new_promotion) that produce unique codes when the user does not supply one.
Tables Accessed
All tables are referenced through APPS synonyms. Name resolution reads AMS_ACT_OFFERS, AMS_ACT_PRODUCTS, AMS_ACT_MESSAGES, AMS_ACT_MARKET_SEGMENTS, AMS_ACT_GEO_AREAS, AMS_ACT_PARTNERS, and AMS_CATEGORIES_TL. Attachment names are resolved from FND_ATTACHED_DOCUMENTS and JTF_AMV_ATTACHMENTS.
Logging operations write to AMS_ACT_LOGS and its sequence-backed sibling objects AMS_ACT_LOGS_S and AMS_ACT_LOGS_TRANSACTION_ID_S. Structural information about entity relationships is read from AMS_OBJECT_ASSOCIATIONS. DUAL supports singleton expression evaluation, and PLITBLM is the standard PL/SQL integer-indexed table type used for bulk collections.
Usage Notes
AMS_CPYUTILITY_PVT is not exposed to end users. It is invoked indirectly by the copy actions available on Oracle Marketing forms and by the public copy APIs of the 23 dependent packages. Typical invocation occurs when a user selects a copy action for a campaign, event, promotion, or marketing element. The calling package delegates code uniqueness and name resolution to this utility, then routes diagnostics through its logging procedures. Custom code should not call this private package directly; extensions built on the documented PL/SQL APIs will exercise it automatically wherever marketing copy operations are performed.