Search Results create_sourcecode




Overview

AMS_SOURCECODE_PVT is a private PL/SQL package body in the Oracle E-Business Suite Applications (APPS) schema that supports the Oracle Marketing (AMS) module's source code generation and lifecycle management functionality. Its principal business purpose is to create, validate, retrieve, modify, and revoke source codes — the unique identifiers assigned to marketing objects such as campaigns, activities, and their associated setups. These source codes are used throughout Oracle Marketing as tracking keys, enabling consistent identification of marketing entities across related records and downstream reporting.

The package is classified as a private (PVT) API, meaning it is not intended for direct external invocation by customer code but rather serves as the internal implementation layer behind the module's public APIs and forms. The header comment indicates version 115.29 dated 2002, reflecting the long lineage of the code into the 12.1.1 and 12.2.2 releases. It is referenced by twelve other packages, underscoring its role as a shared utility within the marketing codebase.

Key Procedures and Functions

The package exposes nine documented procedures and functions. Among the most significant is IS_SOURCE_CODE_UNIQUE, a function that checks whether a proposed source code already exists in the AMS_SOURCE_CODES table, returning a boolean true/false via FND_API.g_true and FND_API.g_false. This uniqueness validation guards against duplicate codes during creation.

GET_NEW_SOURCE_CODE generates a new, unique source code, drawing on geographic, date, and customer/activity setup codes to construct the identifier according to configured profile formats. The GET_SOURCE_CODE function retrieves an existing source code, likely by object type and object identifier. CREATE_SOURCECODE performs the actual creation of a source code record, while MODIFY_SOURCECODE updates an existing source code or its related source object references. REVOKE_SOURCECODE reverses or deactivates a source code when it is no longer valid. These data-manipulation routines follow the standard EBS API pattern, using x_return_status output parameters and FND_API error handling conventions, with debug levels governed by FND_MSG_PUB message-level checks.

Tables Accessed

The package operates against several core marketing tables accessed through APPS synonyms:

  • AMS_SOURCE_CODES — the primary table storing source code definitions; read for uniqueness checks and written during creation, modification, and revocation.
  • AMS_SOURCE_CODES_S and AMS_SOURCE_CODES_GEN_S — the translated/setup sequence tables accompanying the base table, used for surrogate key generation and multilingual support.
  • AMS_GENERATED_CODES — stores generated code components, referenced when constructing new unique source codes.
  • DUAL — used for single-row computations, such as invoking sequences or deriving date-based codes.

Usage Notes

Because this is a private API, AMS_SOURCECODE_PVT is invoked indirectly: typically from Oracle Marketing setup and campaign forms, from concurrent programs that mass-generate or maintain source codes, and from other packages within the AMS schema (twelve documented references). Custom integrators should call the corresponding public API rather than this private package, but developers extending marketing functionality may reference it when building source-code-aware logic. In the 12.1.1 and 12.2.2 environments, the package remains compatible with standard FND_API error-handling and FND_MSG_PUB debugging, and forms-based invocations rely on its return-status conventions to surface validation and unique-constraint messages to the user.