Search Results ams_cpyutility_pvt




Overview

AMS_CPYUTILITY_PVT is a private PL/SQL utility package in the APPS schema that supports the copy and logging infrastructure of Oracle Marketing (AMS). It is classified as a private (PVT) API, meaning it is not intended for direct invocation by external or customer-developed code. Instead, it is consumed internally by the Marketing copy framework, which duplicates campaigns, events, offers, deliverables, and their associated relationships. The package provides two principal categories of service: resolving human-readable display names for foreign-key identifiers of marketing entities (so that copy operations and audit records can be presented meaningfully), and managing the lifecycle of rows in the activity log tables that record what the copy process did. Its central role in the copy log architecture explains why a search for AMS_ACT_LOGS_S returns this package body — the sequence is one of the primary database objects the package depends on.

Key Procedures and Functions

The documented interface comprises nineteen procedures and functions. The largest group consists of name-resolution functions, each of which returns a descriptive name for a stored identifier: GET_OFFER_CODE, GET_EVENT_OFFER_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, GET_SEGMENT_NAME, and GET_EVENT_HEADER_NAME. These are used to populate log messages and copy summaries with labels that a business user can interpret, rather than raw primary keys.

A second group manages log message persistence: INSERT_LOG_MESG, WRITE_LOG_MESG, and REFRESH_LOG_MESG create, write, and re-read log entries associated with an activity log record. A third group provides generic copy-framework services: GET_DATES, GET_COLUMN_VALUE, IS_COPY_ATTRIBUTE, and CHECK_ATTRIB_EXISTS. GET_COLUMN_VALUE supports dynamic attribute retrieval, while IS_COPY_ATTRIBUTE and CHECK_ATTRIB_EXISTS determine whether a given attribute participates in a copy operation and whether it already exists on the target entity. Parameter lists are not documented and should not be assumed.

Tables Accessed

The package reads and writes the activity log tables AMS_ACT_LOGS and its sequence AMS_ACT_LOGS_S, together with AMS_ACT_LOGS_TRANSACTION_ID_S. It also touches the association detail tables AMS_ACT_GEO_AREAS, AMS_ACT_MARKET_SEGMENTS, AMS_ACT_MESSAGES, AMS_ACT_OFFERS, AMS_ACT_PARTNERS, and AMS_ACT_PRODUCTS, which store the copied relationships for each activity. Descriptive and transactional data is drawn from AMS_CATEGORIES_TL, AMS_OBJECT_ASSOCIATIONS, FND_ATTACHED_DOCUMENTS, JTF_AMV_ATTACHMENTS, and DUAL, with PLITBLM used for PL/SQL table array operations. Many of these are accessed indirectly through the AMS_CPYUTILITY_PVT package itself, reflecting internal recursion or shared private helpers.

Usage Notes

Because AMS_CPYUTILITY_PVT is a private package, it is invoked by the Marketing copy engine and by other AMS packages rather than from forms or concurrent programs directly; the metadata records that twenty-three database objects reference it. The name-resolution functions are exercised when the copy process builds log messages and summaries, while the log management routines write entries that can be reviewed in the Marketing activity log user interface. Customer and partner code should use the corresponding public AMS APIs instead of calling this package. As with all APPS private packages, reliance on it is unsupported, and the package body may be regenerated during patching without notice.