Search Results number_too_large




Overview

AP_AMOUNT_UTILITIES_PKG is an Oracle E-Business Suite Accounts Payable utility package whose primary responsibility is the conversion of numeric monetary amounts into their spelled-out character equivalents. In the context of Oracle EBS 12.1.1 and 12.2.2, this package supports the formatting of payment and check amounts in words, a requirement for many printed payment formats, check styles, and positive pay or remittance advice outputs where the written amount must accompany the numeric amount. The package is registered under the APPS schema and is classified as an OTHER API, indicating that it is an internal utility rather than a public, supported interface. Its header indicates the source file apamtutb.pls and a NOSHIP designation, meaning it is delivered as part of the product but is not intended for direct customer modification.

Key Procedures and Functions

The documented package exposes a single callable function, AP_CONVERT_NUMBER, which accepts a numeric value and returns a VARCHAR2 string representing that number expressed in words. Internally the function declares several local variables to hold segment lookups for the zero, thousand, million, and billion groupings, and it references an AP_LOOKUP_CODES lookup type for the displayed text of each grouping. The logic operates by comparing the incoming numeral against a maximum digit threshold of twelve, producing the raised exception NUMBER_TOO_LARGE when the value equals or exceeds ten to the twelfth power. This corresponds directly to the “number_too_large” search term, which is a user-defined exception rather than a standard Oracle error. The function also handles the special zero case, which was introduced to address Bug 459665, returning the lookup text for the ZERO code. The algorithm then decomposes the number into billion, million, thousand, and unit segments, assembling the spoken-word representation from the lookup code descriptions.

Tables Accessed

The package reads from two documented tables. AP_LOOKUP_CODES is queried to retrieve the displayed field values and descriptions that supply the textual words for the amount conversion, including the zero, thousand, million, and billion designators. FND_LANGUAGES is referenced to determine the session language, allowing the function to honor the current NLS language setting when producing the spelled-out amount. The package does not write to any table; it is purely a read and formatting utility.

Usage Notes

AP_CONVERT_NUMBER is typically invoked from payment-related reports and concurrent programs, check printing formats, and custom PL/SQL code that requires an amount expressed in words. Because the package is not a public API, it is generally called indirectly by seeded Oracle code rather than by customer extensions; the documentation indicates it is referenced by one other package, which reinforces its role as a shared internal dependency. When implementing custom payment formats or check styles in Oracle EBS 12.1.1 or 12.2.2, developers may call this function, but they should account for the NUMBER_TOO_LARGE exception and the twelve-digit limit, and should recognize that behavior may differ if the underlying AP_LOOKUP_CODES values are customized.