Results for “as_promotion_codes_v”

4 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

The database view AS_PROMOTION_CODES_V belongs to the Oracle E-Business Suite product family AS – Sales Foundation, which supplies the shared reference entities (lookups, promotions, sales channels, and related classification data) consumed by Oracle Order Management, Advanced Pricing, and other order-to-cash modules. The view exposes promotion code records held in the Sales Foundation promotion tables, enriched with a decoded lookup meaning so that consumers do not need to join the generic lookup table themselves.

Its role in EBS reporting and integration is that of a convenience, read-only projection rather than a transactional entity. Report authors, Oracle Reports/BI Publisher data models, concurrent program extracts, and interface staging queries all reference AS_PROMOTION_CODES_V when they need to enumerate the promotional codes that can be attached to an order, price list, or marketing campaign. Because the view performs the lookup decoding internally, it reduces the join complexity of ad hoc SQL and keeps the presentation of TYPE values consistent across reports. The documented ETRM entry for the object carries the plain description "Promotion codes view" and is documented for the 12.2.2 reference set; in the corresponding 12.1.1 documentation the object is likewise described as a promotion codes view within Sales Foundation.

Underlying Base Objects

The view text documented in the ETRM metadata is defined over two base objects:

  • AS_PROMOTIONS (aliased PROM) — the driving table holding promotion headers, including the promotion identifier, code, name, type, description, and enabled flag.
  • AS_LOOKUPS (aliased LOOK) — the Sales Foundation lookup table used to translate the stored promotion type into its display meaning.

The join predicate is PROM.TYPE = LOOK.LOOKUP_CODE restricted by LOOK.LOOKUP_TYPE = 'PROMOTION_TYPE'. This constrains the lookup side to the PROMOTION_TYPE lookup type only, so the decoded meaning always reflects the promotion-type lookup set rather than any other code sharing the same lookup code value. The metadata records that no base objects are separately documented as referenced and that the view is not implemented in the reference database instance from which the excerpt was taken; queries therefore should be validated against the actual instance before being relied upon.

Key Columns

  • PROMOTION_ID — surrogate primary key of the promotion; the join key to any child promotion detail tables.
  • CODE — the user-facing promotion code entered or scanned by end users.
  • TYPE — the stored promotion type code, matching a PROMOTION_TYPE lookup code.
  • NAME — descriptive name of the promotion.
  • TYPE_CODE — the lookup meaning decoded from AS_LOOKUPS.MEANING, giving the readable type description.
  • DESCRIPTION — free-text description of the promotion.
  • ENABLED_FLAG — Y/N indicator of whether the promotion is active.
  • ENABLED — a derived display column produced by DECODE(PROM.ENABLED_FLAG,'Y','*',NULL), returning an asterisk for enabled promotions and NULL otherwise.

Common Use Cases and Queries

Typical uses include validating a promotion code captured on an order, listing active promotions for a pick list, and extracting promotion codes for a data warehouse load. A simple validation query is:

  • SELECT promotion_id, code, name, type_code FROM as_promotion_codes_v WHERE code = :p_code AND enabled_flag = 'Y';
  • SELECT code, name, type_code FROM as_promotion_codes_v WHERE enabled_flag = 'Y' ORDER BY code; — active promotion listing for reporting.
  • SELECT type_code, COUNT(*) FROM as_promotion_codes_v GROUP BY type_code; — summary of promotions by type.

Note that the user search term "you tube tv promoc code" refers to a consumer streaming promotion and is unrelated to this database object; the view concerns Oracle Sales Foundation promotion codes only. Because the view is not implemented in every database, confirm its presence in ALL_VIEWS before deployment.