Results for “as_scripts_v”

4 results




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

Overview

AS_SCRIPTS_V is a Sales Foundation (AS) reporting view that presents marketing script definitions stored in Oracle EBS. In the Sales Foundation data model, scripts are a specialized form of promotion, distinguished by a TYPE value of 'S'. The view exposes script header attributes along with decoded lookup meanings and territory/letter translations, making it suitable for operational reporting, personalization, and downstream integration where a flat, human-readable script listing is required.

The view is documented as a "Scripts view" within the AS product family and is identified as not implemented in the reference database, meaning it is delivered as a code object and is populated only when Sales Foundation promotional functionality is active and script records exist. This is a view-only object; it carries no independent storage and its contents are always derived from the underlying base tables at query time. Because it joins translated tables such as FND_TERRITORIES_TL, its output is affected by the session language through USERENV('LANG').

Underlying Base Objects

The view text is defined entirely over two Sales Foundation base tables, AS_PROMOTIONS and AS_LOOKUPS, plus the territory translation table FND_TERRITORIES_TL. AS_PROMOTIONS appears twice: once aliased as P for the script record itself, and once aliased as L for the associated letter record referenced by SCRIPT_LETTER_ID. AS_LOOKUPS is referenced three times (LKUP1, LKUP2, LKUP3) to decode status, language, and script type respectively. FND_TERRITORIES_TL supplies the territory short name, restricted to the current session language.

All lookup joins use the outer-join (+) syntax, and the script letter join (P.SCRIPT_LETTER_ID = L.PROMOTION_ID(+)) is likewise outer, so a script without a matching letter or decode still returns a row. The view is filtered so that only rows where P.TYPE = 'S' appear, isolating scripts from other promotion types. The documented referenced base objects for this view are not enumerated by ETRM, but the embedded view text confirms AS_PROMOTIONS, AS_LOOKUPS, and FND_TERRITORIES_TL as the operative sources.

Key Columns

Common Use Cases and Queries

Typical uses include script inventory reporting, validating that a script is linked to the correct letter, and feeding script attributes into campaign analytics or integrations. Because the letter name is exposed, users often search for a known letter and then retrieve the scripts attached to it.

  • List all enabled scripts with their status meaning: SELECT script_id, name, code, status_code, enabled_flag FROM as_scripts_v WHERE enabled_flag = 'Y';
  • Find scripts attached to a specific letter by name: SELECT script_id, name, code FROM as_scripts_v WHERE name = '&letter_name'; (or filter on the letter's NAME column returned by the P.SCRIPT_LETTER_ID = L.PROMOTION_ID(+) join).
  • Report script type distribution: SELECT script_type_code, COUNT(*) FROM as_scripts_v GROUP BY script_type_code;
  • Retrieve scripts for a given country and language: SELECT script_id, name, country_code, language_code FROM as_scripts_v WHERE country_code = 'US';

Note that the letter_name search term maps to the letter's NAME column surfaced through the self-join rather than a dedicated column; queries should reference the letter alias columns or filter on the relevant returned value. All queries return only scripts (TYPE = 'S') and are subject to session-language territory translation.