Search Results ams_source_codes_s




Overview

AMS_SOURCECODE_PVT is a private PL/SQL package that forms the internal implementation layer for source code generation and lifecycle management within the Oracle Marketing (AMS) module of Oracle E-Business Suite. In the context of release 12.1.1 and 12.2.2, the package encapsulates the core logic used to create, retrieve, revoke, and modify source codes. Source codes are unique identifiers assigned to marketing activities and related entities, commonly used to track responses, campaigns, and lead attribution across marketing channels. By centralizing this logic in a private package, Oracle separates the low-level source code mechanics from the public AMS API surface, allowing the public APIs to delegate validated operations to this package without exposing internal procedures directly to customer extensions.

Key Procedures and Functions

The package exposes nine documented procedures and functions, of which the following are the principal entry points:

  • IS_SOURCE_CODE_UNIQUE — Validates whether a proposed source code already exists in AMS_SOURCE_CODES, returning a boolean indicator through FND_API constants. This prevents duplicate source codes from being generated or assigned.
  • GET_NEW_SOURCE_CODE — Generates a new unique source code, typically composed from geographic, date, and customer-related segments, using sequence values from AMS_GENERATED_CODES.
  • GET_SOURCE_CODE — Retrieves an existing source code for a given entity or context, returning the stored value to the caller.
  • CREATE_SOURCECODE — Inserts a new source code record, applying uniqueness validation and populating the base table along with its translated (_S) and generated sequence (_GEN_S) companion tables.
  • REVOKE_SOURCECODE — Marks a source code as revoked or inactive, preventing further use while preserving audit history.
  • MODIFY_SOURCECODE — Updates an existing source code record or its related source object associations. This is the procedure most closely associated with the user search term "modify_sourcecode," and it is declared as a forward declaration in the package body header.

Additional private helpers support these public operations but are not individually documented in the metadata.

Tables Accessed

The package reads and writes the following tables through APPS synonyms:

  • AMS_SOURCE_CODES — The primary base table holding source code records, their relationships to source objects, and their status. Read for uniqueness checks and lookups; written during create, modify, and revoke operations.
  • AMS_SOURCE_CODES_S — The translated (language-specific) companion table storing user-facing descriptive attributes.
  • AMS_SOURCE_CODES_GEN_S — Stores generated source code sequence segments used during automatic code construction.
  • AMS_GENERATED_CODES — Supplies sequential numeric components when a new source code is generated programmatically.
  • DUAL — Used for singleton computations and sequence operations.

Usage Notes

AMS_SOURCECODE_PVT is not intended for direct invocation by customer code, consistent with its PVT classification. It is referenced by twelve other AMS packages, which act as the public API layer. In practice, the package is invoked:

  • From Oracle Marketing forms and the HTML-based Marketing UI when users create or modify marketing activities requiring source codes.
  • From concurrent programs that batch-generate source codes for campaigns or list entries.
  • Indirectly through public AMS APIs, such as those handling campaign and activity definition.

Because the package maintains translated and generated sequence tables in concert with the base table, any customization involving source codes should be routed through the supported public APIs rather than calling AMS_SOURCECODE_PVT directly, ensuring that all companion tables remain synchronized.