Search Results get_agreement_revision
Overview
OE_VIEW_FUNCTIONS is an Oracle Order Management (ONT) view-layer utility package owned by APPS. In Oracle EBS 12.1.1 and 12.2.2 it serves a narrow but important presentation role: it centralizes the construction of display-oriented strings that Oracle Forms and other Order Management user interfaces require, without touching transactional data directly. The package body carries a single documented function, GET_AGREEMENT_REVISION, which builds a formatted "Agreement (Revision)" label by concatenating an agreement name with its revision value.
The package header comment indicates a last significant revision in May 2005 (OEXVIFNB.pls 120.0), which is consistent with the package's role as stable presentation infrastructure carried forward unchanged into the 12.1.1 and 12.2.2 code lines. Because the function performs no DML and reads no base tables, it is lightweight and side-effect free, making it safe to call from within form triggers, view definitions, and report queries.
Key Procedures and Functions
- GET_AGREEMENT_REVISION — Accepts an agreement name and a revision value and returns a single concatenated VARCHAR2 string suitable for display to the end user. The function does not assemble the string manually; instead it delegates formatting to the Oracle Forms message dictionary. It calls FND_MESSAGE.SET_NAME with the message ONT_CONCAT_AGREEMENT_REVISION, binds the incoming values to the AGREEMENT and REVISION tokens via FND_MESSAGE.SET_TOKEN, and then retrieves the resolved text through FND_MESSAGE.GET. This approach keeps the visible separator and any translation-specific punctuation under the control of the message repository rather than hard-coding it in PL/SQL, which supports multilingual deployments. The function declares a local VARCHAR2(2000) variable to hold the result.
- Exception handling — The function traps WHEN OTHERS and returns NULL rather than propagating the error. Callers must therefore be prepared to receive NULL if the message name or tokens cannot be resolved, and should treat that as an absent label rather than as a fatal condition.
Tables Accessed
The package body performs no direct SQL against application tables. No base tables or APPS synonyms are documented as referenced. All data retrieval is indirect: FND_MESSAGE.GET reads the Oracle Application Object Library message tables (FND_MESSAGES and its associated token and language tables) through the standard FND_MESSAGE API. The values returned to the caller are therefore limited to the agreement name and revision strings passed in by the calling context; the package itself resolves no agreement or order data from the Order Management schema.
Usage Notes
GET_AGREEMENT_REVISION is intended for display formatting only and is typically invoked where Order Management needs to render a combined agreement-and-revision label, such as in form fields, descriptive flexfield derivations, or custom report layouts. Because the function returns NULL on any exception, custom code should default the display when a NULL result is received. The metadata records that this package is referenced by one other package, confirming that it is consumed programmatically by shared ONT code rather than being called directly by end users. Developers extending Order Management should call this function rather than reimplementing the concatenation, since doing so guarantees consistency with the ONT_CONCAT_AGREEMENT_REVISION message and preserves translation behavior across supported languages in 12.1.1 and 12.2.2.