Search Results batch_insert_error
Overview
PSB_MESSAGE_S is a public PL/SQL specification owned by the APPS schema in Oracle E-Business Suite. It forms part of the PSB module set (associated with Oracle Services Procurement, also known as the Services Procurement or "iProcurement services" family) and provides a centralized messaging utility for error and success handling. In EBS 12.1.1 and 12.2.2, this package abstracts the mechanics of building, storing, and displaying messages so that calling programs remain consistent in how they communicate outcomes to end users.
The package header retained in ETRM carries the version marker $Header: PSBSTMSS.pls 120.2 2004/12/06, indicating it is a long-standing, stable interface that has not changed materially across the 12.1.1 and 12.2.2 releases. Bug number 4030864 is referenced in the source, which added the BATCH_INSERT_ERROR procedure and the associated internal flag l_batch_error_flag BOOLEAN := FALSE. The package is classified as "OTHER" in the API registry because it exposes utility routines rather than a business entity API.
Key Procedures and Functions
- GET — A function that retrieves a message string from the message repository, keyed by message index. An encoded flag parameter controls whether the returned value is encoded. This is the primary read access point for stored messages.
- PRINT_ERROR — A procedure that formats and outputs error information. A mode parameter selects the output destination or style, and a print_header flag controls whether a header line is included. Used to surface the error stack to users or logs.
- INSERT_ERROR — A procedure that records a new error entry for a given source process and process identifier, capturing the message count and message data. An optional description-sequence parameter modifies how the inserted row is ordered.
- PRINT_SUCCESS — A procedure that outputs a standard success notification, simplifying consistent confirmation messages across modules.
- GET_ERROR_MESSAGE — A procedure that returns the assembled error message text through an output parameter. It accepts the same header flag as PRINT_ERROR, so callers can produce either a bare message or a headed block.
- GET_SUCCESS_MESSAGE — A procedure that returns the standard success message text via an output parameter, allowing callers to embed it in their own output rather than printing it directly.
- GET_ERROR_STACK — A function that returns the full error stack as a single VARCHAR2, based on the supplied message count. Useful for logging or for presenting multiple errors in one string.
- BATCH_INSERT_ERROR — A procedure added under bug 4030864 that inserts errors in a batch context, accepting a source process and process identifier. It is designed for cases where several errors are collected and persisted together rather than inserted one at a time.
Tables Accessed
The documented table reference is PSB_ERROR_MESSAGES, accessed through an APPS synonym. The INSERT_ERROR and BATCH_INSERT_ERROR procedures write error rows into this table, storing the source process, process identifier, message count, encoded message data, and description sequence. The GET, GET_ERROR_MESSAGE, GET_SUCCESS_MESSAGE, and GET_ERROR_STACK routines read from it (or the underlying message definitions it draws on) to reconstruct the text presented to users. PRINT_ERROR and PRINT_SUCCESS do not necessarily touch the table directly; they format and emit text already assembled by the other routines.
Usage Notes
PSB_MESSAGE_S is referenced by twenty other packages in the EBS data model, which confirms its role as a shared messaging utility rather than an end-user-facing API. Typical invocation patterns include:
- Concurrent programs that call INSERT_ERROR or BATCH_INSERT_ERROR to persist validation or processing errors, then call PRINT_ERROR or GET_ERROR_STACK to emit them to the concurrent log.
- Forms and OAF-based pages that use GET_ERROR_MESSAGE, GET_SUCCESS_MESSAGE, and PRINT_ERROR to present standardized dialog messages without re-implementing formatting logic.
- Custom PL/SQL code that needs a consistent message format; developers should treat the specification as read-only and call the public routines rather than modifying package source.
- Batch processes running on EBS 12.1.1 or 12.2.2 that must accumulate multiple errors before insertion, using BATCH_INSERT_ERROR for efficiency.
Because only the specification body excerpt is documented here, parameter defaults should be verified against the installed package in the target environment before calling these routines from custom code.
-
APPS.PSB_MESSAGE_S SQL Statements
12.1.1
-
PACKAGE: APPS.PSB_MESSAGE_S
12.1.1
-
PACKAGE BODY: APPS.PSB_MESSAGE_S
12.1.1