Search Results completed_flag
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
AS_EVENT_LETTERS is a multi-organization reporting view owned by the APPS schema in Oracle E-Business Suite, belonging to the AS (Sales Foundation) product family. It presents event letter data — records that associate a business or marketing event with a letter generated for a contact or party — while enforcing the operating unit security model through a row-filtering WHERE clause on ORG_ID. Rather than exposing all rows, the view derives the current organization context from the session variable USERENV('CLIENT_INFO'), which Oracle EBS sets when a user selects an operating unit. This makes the view the standard, security-aware access point for event letter information in reports, concurrent programs, and integrations, as opposed to querying the underlying base table directly.
Underlying Base Objects
The documented view metadata identifies a single referenced base object: the synonym AS_EVENT_LETTERS_ALL, which points to the underlying multi-org table. AS_EVENT_LETTERS_ALL stores event letter rows for all operating units, without any organization filter. AS_EVENT_LETTERS is defined as a SELECT over that synonym, listing every column of the base table and appending a WHERE predicate:
NVL(ORG_ID, NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'), 1, 1), ' ', NULL, SUBSTRB(USERENV('CLIENT_INFO'), 1, 10))), -99)) = NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'), 1, 1), ' ', NULL, SUBSTRB(USERENV('CLIENT_INFO'), 1, 10))), -99)
This predicate extracts the first ten characters of CLIENT_INFO as the active organization identifier and compares it to the row's ORG_ID, treating a null ORG_ID as -99. Users therefore see only event letters belonging to the operating unit currently set in their session. The view is documented as VALID.
Key Columns
- EVENT_LETTER_ID — Primary identifier of the event letter record.
- EVENT_ID — The event to which the letter relates.
- LETTER_ID — The letter definition used to generate the communication.
- TYPE_CODE — Classifies the event letter type.
- ENROLLMENT_STATUS_CODE — Status of the associated enrollment, where applicable.
- COMPLETED_FLAG — Indicates whether processing of the event letter has completed. Because the column name is less descriptive than most, it is a frequent target of ad hoc investigation; values are typically 'Y'/'N'.
- MAIL_DATE — Date the letter was or is scheduled to be mailed.
- ORG_ID — Operating unit that owns the row; drives the view's security filter.
- Standard WHO columns — CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN.
- Concurrent program columns — REQUEST_ID, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, identifying the program that created or last updated the record.
- ATTRIBUTE_CATEGORY and ATTRIBUTE1–15 — Descriptive flexfield segments available for customer-specific extensions.
Common Use Cases and Queries
Typical uses include operational reporting on event letter status, reconciliation of mailings, and integration extracts. Because of the CLIENT_INFO filter, queries must run within a session whose operating unit context is initialized; a raw SQL*Plus session without initializing CLIENT_INFO returns only rows with ORG_ID matching the fallback value.
Find letters not yet completed for the current operating unit:
SELECT event_letter_id, event_id, letter_id, mail_date
FROM apps.as_event_letters
WHERE NVL(completed_flag, 'N') = 'N';
Count event letters by type and completion status:
SELECT type_code, completed_flag, COUNT(*) qty
FROM apps.as_event_letters
GROUP BY type_code, completed_flag;
Retrieve recent mailings for one event:
SELECT event_letter_id, letter_id, mail_date, completed_flag
FROM apps.as_event_letters
WHERE event_id = :event_id
ORDER BY mail_date DESC;
For cross-organization reporting, developers should query AS_EVENT_LETTERS_ALL and apply an explicit ORG_ID predicate rather than relying on the security-aware view.
-
View: AS_EVENT_LETTERS
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_EVENT_LETTERS, object_name:AS_EVENT_LETTERS, status:VALID, product: AS - Sales Foundation , description: Event letters (multi-org) , implementation_dba_data: APPS.AS_EVENT_LETTERS ,
-
View: AS_EVENT_LETTERS
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_EVENT_LETTERS, object_name:AS_EVENT_LETTERS, status:VALID, product: AS - Sales Foundation , description: Event letters (multi-org) , implementation_dba_data: APPS.AS_EVENT_LETTERS ,
-
Table: AS_EVENT_LETTERS_ALL
12.1.1
owner:OSM, object_type:TABLE, fnd_design_data:AS.AS_EVENT_LETTERS_ALL, object_name:AS_EVENT_LETTERS_ALL, status:VALID, product: AS - Sales Foundation , description: Contains letters to be used for events , implementation_dba_data: OSM.AS_EVENT_LETTERS_ALL ,
-
Table: AS_EVENT_LETTERS_ALL
12.2.2
owner:OSM, object_type:TABLE, fnd_design_data:AS.AS_EVENT_LETTERS_ALL, object_name:AS_EVENT_LETTERS_ALL, status:VALID, product: AS - Sales Foundation , description: Contains letters to be used for events , implementation_dba_data: OSM.AS_EVENT_LETTERS_ALL ,
-
View: AS_EVENT_LETTERS_V
12.2.2
product: AS - Sales Foundation , description: Event letters view , implementation_dba_data: Not implemented in this database ,
-
View: AS_EVENT_LETTERS_V
12.1.1
product: AS - Sales Foundation , description: Event letters view , implementation_dba_data: Not implemented in this database ,