Search Results cg_gen_process




Overview

AMS_LIST_OPTIONS_PVT is a private PL/SQL package in the Oracle E-Business Suite Advanced Marketing (AMS) module. It encapsulates the optional processes that surround list generation within the marketing list generation engine. The header comments indicate the package was created in July 2005 to consolidate code relating to non-mandatory processing steps, specifically random list generation, suppression, maximum size restriction, and control group generation, separating these functions from the core list generation engine.

The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking user rather than the package owner, a standard pattern for private APIs that operate on behalf of calling sessions in the APPS schema. Because it is classified as a PVT (private) package, it is not intended as a public integration interface; it supports internal processing flows initiated from list generation and related marketing components.

Key Procedures and Functions

The documented package exposes five procedure overloads across three distinct logical operations:

  • CG_GEN_PROCESS — A concurrent-program style entry point that accepts the standard errbuf and retcode OUT parameters along with a list header identifier. It drives control group generation for a specified list, allowing the operation to be scheduled or submitted as a concurrent request.
  • CONTROL_GROUP_GENERATION (two overloads) — Performs the actual control group generation logic for a list. The first overload returns a message table (G_MSG_TBL_TYPE) in addition to status and message outputs; the second omits the message table and returns only status and message data. Both accept a list header identifier and an optional log level, supporting diagnostic tracing.
  • APPLY_SIZE_REDUCTION (two overloads) — Applies the maximum size restriction to a list, reducing list entries to conform to a configured size limit. As with control group generation, one overload returns the message table for detailed per-step logging and the other returns only aggregated status information. Both accept the list header identifier and an optional log level.

Tables Accessed

The package operates against two core marketing tables referenced through APPS synonyms:

  • AMS_LIST_HEADERS_ALL — The list header table, which stores list-level definitions and attributes including the settings that govern size restrictions and control group configuration. The package reads and updates header-level status as processing proceeds.
  • AMS_LIST_ENTRIES — The list entry detail table containing the individual members and prospects belonging to a list. Size reduction and control group operations read and modify entries within this table.

The package also utilizes DBMS_RANDOM for randomized selection during control group generation, and PLITBLM, the standard Oracle Application Object Library message-table utility used with the G_MSG_TBL_TYPE message structure for logging and error reporting.

Usage Notes

AMS_LIST_OPTIONS_PVT is invoked internally by the list generation engine and by marketing forms that manage list processing. The CG_GEN_PROCESS procedure, with its errbuf and retcode signature, is suited to invocation from a concurrent program definition or from PL/SQL that submits a request. The remaining procedures are called programmatically, typically immediately after entries are populated into a list, when the list definition specifies a maximum size or requires a control group.

The two-overload pattern is a common EBS convention: callers that need to display or persist detailed processing messages use the message-table variant, while those that require only return status use the simpler signature. Because the package is private and undocumented in the public integration guides, custom code should avoid direct dependency on it. The ETRM metadata records that it is referenced by only one other package, confirming its role as an internal supporting utility within the AMS list generation subsystem rather than a general-purpose API.