Search Results log_interface_error_message




Overview

RCV_ERROR_PKG is a PL/SQL package in the APPS schema that provides the standard error and warning handling mechanism for Oracle E-Business Suite receiving and purchasing interface processing. The package is declared AUTHID CURRENT_USER, meaning it executes with the privileges of the calling user rather than the owner, which allows it to be invoked safely from a broad range of interface and validation routines.

The package implements a small error stack shared by callers. Its two principal entry points are LOG_INTERFACE_ERROR and LOG_INTERFACE_WARNING, which are nearly identical in behavior with one important distinction: LOG_INTERFACE_ERROR raises the terminal exception RCV_ERROR_PKG.E_FATAL_ERROR, whereas LOG_INTERFACE_WARNING records the condition without raising an exception. This design allows a caller to treat a field-level warning as non-terminal while ensuring that a field error immediately unwinds the current block to a dedicated exception handler.

RCV_ERROR_PKG is part of the receiving integration infrastructure. It is referenced by 31 other packages, indicating that it is a widely used utility within the RCV and PO interface code paths rather than a standalone program. Its status constants mirror the FND_API conventions, with the addition of a warning status value of 'W'.

Key Procedures and Functions

The documented API consists of 31 procedures and functions. The most significant are:

  • LOG_INTERFACE_ERROR — records a terminal error against a specified table and column and raises E_FATAL_ERROR.
  • LOG_INTERFACE_ERROR_MESSAGE — records a message-based terminal error.
  • LOG_INTERFACE_WARNING — records a non-terminal warning; does not raise an exception.
  • LOG_INTERFACE_MESSAGE — records an informational message.
  • SET_ERROR_MESSAGE — establishes the current message tag (for example, RCV_FIELD_ERROR) prior to logging, so that token substitution can occur.
  • SET_TOKEN — supplies a value for a token placeholder in the current message string; called once per token.
  • SET_SQL_ERROR_MESSAGE — captures a SQL error into the message framework.
  • CHECK_AND_RESET_RESULT and CHECK_AND_NORESET_RESULT — inspect the accumulated result and optionally reset the error state, enabling cascading errors to be propagated to parent records.
  • HAS_ERRORS — returns whether any error has been recorded.
  • INITIALIZE — resets the error stack at the start of a transaction loop, accepting type and identifier arguments.
  • CLEAR_MESSAGES — empties the current message buffer.
  • GET_LAST_MESSAGE — retrieves the most recently logged message (the source also documents get_error_count, get_last_error, and get_all_errors equivalents).
  • TEST_IS_NULL, DEFAULT_AND_CHECK — utility validation helpers used within interface validation logic.

Tables Accessed

The package operates against two documented tables through APPS synonyms:

  • FND_NEW_MESSAGES — the message repository from which message text and token definitions are resolved when SET_ERROR_MESSAGE names a tag. Message expansion and token substitution are driven by this table.
  • PO_INTERFACE_ERRORS — the persistent interface error table where logged errors and warnings are recorded so that they can be reviewed and corrected by users before the interface is resubmitted.

Usage Notes

RCV_ERROR_PKG is not a user-facing concurrent program or form; it is invoked programmatically by interface validation and derivation routines. The recommended pattern, as documented in the package header, is to call INITIALIZE at the top of each transaction loop to reset the error stack, then call SET_ERROR_MESSAGE followed by SET_TOKEN for each placeholder, and finally call LOG_INTERFACE_ERROR or LOG_INTERFACE_WARNING with the affected table and field name. Callers should define an exception handler for RCV_ERROR_PKG.E_FATAL_ERROR and assign the corresponding status constant (g_ret_sts_error or g_ret_sts_warning) to the record's error status. CHECK_AND_RESET_RESULT is then used to halt processing of dependent child records when a parent error occurs.