Results for “check_object_status”
16 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.AMS_REFRESHMETRIC_PVT is a private PL/SQL package within the Oracle E-Business Suite Oracle Marketing (AMS) module. Its principal business function is the recalculation and refresh of marketing activity metrics. The package recalculates the value of a given activity metric and then updates the corresponding Activity Metric rows together with the associated usage tables so that the stored metric values remain consistent with the underlying transactional data.
In addition to refreshing existing metrics, the package carries the logic required to generate seeded metrics from defined templates. It also handles metric apportioning, which is the process of distributing a metric value across multiple contributing entities according to defined allocation rules. Because the package is classified as PVT (private), it is not intended as a public integration API; it serves as the internal engine used by the Oracle Marketing metric framework and by other packages within the application. The documented metadata notes that the package is referenced by seven other packages, confirming its role as a shared internal utility for metric processing. It is declared with AUTHID CURRENT_USER, meaning execution privileges are resolved against the invoking schema.
Key Procedures and Functions
- REFRESH_METRIC — The core public procedure of the package. It recalculates the value for a given activity metric, taking an activity metric identifier and a refresh type, and returning the standard FND_API return status, message count, and message data. Later history entries indicate it was extended to accept object parameters and to check object status for cancelled records.
- REFRESH_ACT_METRICS — Drives the refresh of activity metrics in bulk. The package history records the addition of a p_update_history parameter to this module, allowing the caller to control whether a history record is maintained.
- GETMETCATVAL — A helper function that retrieves a metric category value, supplying the category context needed when computing or refreshing metric values.
- COPY_SEEDED_METRIC — Copies metrics derived from seeded templates, supporting the creation of seeded metrics from the template definitions maintained in the metric template tables.
- CREATE_APPORT_METRIC — Creates apportioned metrics. This is the procedure most directly associated with apportioning logic, splitting a metric across the entities to which it applies.
- CONVERT_UOM — Converts unit-of-measure values so that metrics expressed in differing units can be compared or aggregated consistently.
- CHECK_OBJECT_STATUS — Validates the status of the object associated with a metric, including detection of cancelled statuses before refresh is attempted.
Tables Accessed
The package reads from and writes to the core Oracle Marketing metric and campaign tables through APPS synonyms. AMS_ACT_METRICS_ALL holds the activity-level metric values that are created and refreshed. AMS_METRICS_ALL_B and AMS_METRIC_ACCRUALS (with its sequence AMS_METRIC_ACCRUALS_S) store metric definitions and accrued values. AMS_MET_TPL_HEADERS_B and AMS_MET_TPL_DETAILS provide the templates from which seeded metrics are copied.
Campaign and schedule context is drawn from AMS_CAMPAIGNS_ALL_B and AMS_CAMPAIGN_SCHEDULES_B. Deliverable, event, and offer data are read from AMS_DELIVERABLES_ALL_B, AMS_EVENT_HEADERS_ALL_B, and AMS_EVENT_OFFERS_ALL_B. AMS_CATEGORIES_B, AMS_OBJECT_ASSOCIATIONS, and AMS_CUSTOM_SETUP_ATTR supply categorization, object relationship, and setup attribute information. DUAL is used for single-row expressions.
Usage Notes
Because AMS_REFRESHMETRIC_PVT is a private package, it is normally invoked indirectly. Oracle Marketing concurrent programs, such as metric refresh or metric accrual processes, call the package to recalculate metrics on a scheduled or on-demand basis. The Oracle Marketing forms layer invokes it when a user requests a metric refresh from the application UI. The seven dependent packages also call these routines as part of broader processing flows, for example during campaign closure or seeded metric creation.
Custom code should generally avoid calling this private package directly and should instead rely on supported public APIs. Where direct invocation is unavoidable, callers must supply a valid API version, must observe the FND_API conventions for initializing the message list and committing, and must verify the returned x_return_status before proceeding. The presence of apportioning and unit-of-measure conversion logic means metric results depend on correctly configured templates, categories, and allocation rules; incomplete setup will cause refresh or apportionment to fail or to produce incorrect values.