Search Results get_string_lng_bg
Overview
APPS.HR_BPL_MESSAGE is a server-side PL/SQL package body belonging to the Oracle E-Business Suite human resources module, specifically the Business Process Library (BPL) component used by the Oracle HRMS alerting and notification framework. Its principal business function is to serve as a message-handling utility: it stores an application name and message name in package-level state, resolves the language in which the message should be rendered for a given recipient, and retrieves the translated message text from the FND message repository. In this respect the package acts as the runtime engine behind person- and assignment-specific alert notifications, ensuring that a message delivered to a recipient is rendered in that recipient's preferred language rather than in the language of the session that generated the alert.
The package maintains session-scoped global variables (MSGNAME, MSGDATA, MSGAPP, MSGSET, and g_mes_lng) that hold the currently selected message definition, its resolved text, the owning application, and the language derived from the recipient context. The documented API classification is OTHER, and the package is referenced by one other package within the EBS schema. The source header identifies the file as perbamsg.pkb, version 120.0, last modified in 2005.
Key Procedures and Functions
The package exposes twelve documented procedures and functions. The SET_NAME family establishes the message context and simultaneously resolves the recipient language through the HR_BPL_ALERT_RECIPIENT package:
- SET_NAME_PSN — sets the application and message name and derives the language for a specific person.
- SET_NAME_SUP — sets the message context and derives the language from an assignment's supervisor.
- SET_NAME_PSUP — sets the message context and derives the language from an assignment's primary supervisor.
- SET_NAME_PSN_PSUP — sets the message context using a person identifier for language resolution.
- SET_NAME — sets the message context and derives the language from a business group.
- GET_STRING_LNG_BG — retrieves a translated message string for a specified language and business group; this is the routine most commonly referenced when searching on translated message retrieval.
- GET — returns the message text currently held in package state.
- SET_TOKEN and SET_TOKEN_SQL — register substitution tokens or SQL-derived token values used to populate placeholders within the message text.
- FETCH_SQL_TOKEN — resolves and fetches token values produced by a SQL statement.
- RETRIEVE — assembles the final message by combining the message definition with its resolved tokens.
- CLEAR — resets the package-level state so that a subsequent message can be prepared without residual data.
Tables Accessed
The package reads from two documented tables accessed through APPS synonyms. FND_APPLICATION is used to identify and validate the application that owns the message, consistent with the MSGAPP variable set by the SET_NAME procedures. FND_NEW_MESSAGES is the message repository from which the translated message text and token definitions are sourced; the GET and RETRIEVE routines depend on this table (typically via the FND_MESSAGE API layer) to produce language-specific output. No direct DML against these tables is documented.
Usage Notes
HR_BPL_MESSAGE is invoked at runtime by the HRMS alerting and business process library components rather than directly from a form or concurrent program. Typical callers are notification generators, workflow-driven alert processes, and other PL/SQL packages (one documented dependent package) that need to emit a recipient-specific, translated message. The standard invocation pattern is: call the appropriate SET_NAME variant to establish application, message name, and recipient language; optionally register tokens with SET_TOKEN or SET_TOKEN_SQL; call RETRIEVE or GET to obtain the resolved text; then call CLEAR before reusing the package in the same session. Because the working storage is package-global, the package is not re-entrant across concurrent logical message builds within a single session, and callers should complete each message cycle before starting another.