Search Results get_fnd_msg_pub_last
Overview
PO_MESSAGE_S is a utility package body in the APPS schema that provides centralized message handling, error capture, and exception management services for the Oracle Purchasing module. It is not a transactional API in the conventional sense; rather, it functions as an infrastructure layer that other Purchasing packages call to register, format, store, and retrieve messages and exceptions raised during processing. The package abstracts the interaction with the Oracle Application Object Library (AOL) message stack — specifically FND_MESSAGE, FND_MSG_PUB, and FND_NEW_MESSAGES — so that Purchasing code can raise and interpret errors consistently without duplicating message-stack logic.
The object is validated and classified as OTHER in the ETRM 12.2.2 metadata. Its reach is substantial: it is referenced by 312 other database objects, confirming its role as a widely shared dependency across the Purchasing schema, while it itself references no external application tables except through documented dependencies.
Key Procedures and Functions
The package exposes thirteen documented procedures and functions. The principal ones are described below:
- SQL_ERROR — Captures and raises the standard Oracle database SQL error, translating an Oracle server error into the application message framework.
- APP_ERROR — Raises an application-level (non-SQL) error, typically used when business validation fails rather than a database exception.
- SQL_SHOW_ERROR — Displays or surfaces the currently stored SQL error, allowing callers to present the captured database message to the user or log it.
- APP_SET_NAME — Establishes the application or program identifier under which subsequent messages are registered, ensuring that messages are attributed to the correct source.
- CLEAR — Clears the message stack or internal message state, used to reset error context between processing units.
- GET_FND_MSG_PUB_LAST — Retrieves the most recent message recorded on the FND_MSG_PUB stack, enabling callers to inspect the last error or informational message.
- ADD_EXC_MSG — Adds an exception message to the message stack, allowing a caught exception to be recorded alongside existing messages.
- CONCAT_FND_MESSAGES_IN_STACK — Concatenates the messages currently held in the FND message stack into a single consolidated string, useful for logging or displaying multiple errors as one block.
Tables Accessed
The only documented table referenced through APPS synonyms is FND_NEW_MESSAGES, the Oracle Application Object Library repository of application messages and their translations. PO_MESSAGE_S reads from this table to resolve message names into their actual text tokens, which it then places onto the FND_MSG_PUB stack. All other dependencies are code-level rather than table-level: APP_EXCEPTION, FND_API, FND_MESSAGE, FND_MSG_PUB, PO_DEBUG, and PO_LOG, plus the SYS.STANDARD package. The dependency on PO_LOG and PO_DEBUG indicates that message handling is also integrated with Purchasing's diagnostic logging framework.
Usage Notes
PO_MESSAGE_S is an internal infrastructure package rather than a public interface. It is invoked at runtime by Purchasing forms, concurrent programs, and other PL/SQL packages whenever an error condition, exception, or user-facing message must be recorded or retrieved. Because it is referenced by 312 other objects, it should be treated as a foundational dependency: changes to its behavior can affect a large portion of the Purchasing module. Custom code that integrates with Purchasing error handling may call the documented procedures directly, but the recommended pattern is to raise exceptions through the standard FND_API and APP_EXCEPTION conventions, letting PO_MESSAGE_S manage the underlying message stack. The object is valid and present in both Oracle EBS 12.1.1 and 12.2.2 environments as delivered by Oracle.
-
PACKAGE BODY: APPS.PO_MESSAGE_S
12.2.2
-
PACKAGE BODY: APPS.PO_MESSAGE_S
12.1.1
-
PACKAGE: APPS.PO_MESSAGE_S
12.1.1
-
PACKAGE: APPS.PO_MESSAGE_S
12.2.2
-
APPS.PO_MESSAGE_S dependencies on FND_MSG_PUB
12.1.1
-
APPS.PO_MESSAGE_S dependencies on FND_MSG_PUB
12.2.2
-
APPS.PO_MESSAGE_S dependencies on FND_API
12.1.1
-
APPS.PO_MESSAGE_S dependencies on FND_API
12.2.2