Search Results jsprepstring_long




Overview

AP_CARD_DATABASE_PKG is a PL/SQL package body owned by the APPS schema in Oracle E-Business Suite (documented against 12.2.2 and equally applicable to 12.1.1). It belongs to the Oracle Payables (AP) module and provides the data-access layer for the Payment Card functionality — the credit-card program infrastructure that allows procurement cards and corporate cards to be managed within Payables. The package performs the low-level queries and utility routines that forms, batch processes, and other Payables programs rely on when they must validate a card program, resolve its currency, retrieve employee information, or resolve descriptive flexfield prompts and reference data. It is classified in the ETRM as "OTHER," meaning it is an internal implementation package rather than a published public API. The header indicates it has been a stable, minimally maintained object, with no shipping flag on the last recorded revision, confirming that its interfaces are consumed by Oracle's own card-management forms rather than being intended for direct customer callouts.

Key Procedures and Functions

Ten documented program units are exposed by the package specification and body:

  • GETCARDPROGRAMCURRENCYCODE — returns the currency code associated with a given card program by querying AP_CARD_PROGRAMS on card_program_id. It returns TRUE on success and FALSE on NO_DATA_FOUND, raising a propagated application exception for unexpected errors.
  • GETLOOKUPCODESCURSOR — opens a strongly-typed ref cursor over AP_LOOKUP_CODES for a supplied lookup type, returning the lookup code and displayed value. It is used to populate list-of-values and poplist items in the card setup forms.
  • GETCURRCODEPROPERTIES — resolves currency attributes such as the currency name, precision (NVL to zero when null), and minimum accounting unit from the FND currency views.
  • GETCOAOFSOB — returns the chart of accounts associated with a specified set of books, supporting accounting-flexfield context resolution for card transactions.
  • GETAKPAGEROWID — retrieves the AK page/row identifier used by the Oracle AK (Application Kit) framework, which drives the flexfield and region rendering logic for the card forms.
  • GETEMPLOYEEINFO — returns employee details, typically used to validate the cardholder or default the card's employee assignment.
  • GETPROMPTS — returns descriptive-flexfield prompt labels for the card profile form, ensuring the UI displays the correct attribute names.
  • RAISEEXCEPTION — a centralized error-handling helper that records the failing procedure name (for example GetCardProgramCurrencyCode or GetLookupCodesCursor) before APPS.APP_EXCEPTION re-raises with the standard message stack.
  • JSPREPSTRING_LONG and JSPREPSTRING — utility routines that prepare and escape string values for safe passing to the Java/HTML front-end (the JSP/Forms applet layer), handling length limits and special characters. JSPREPSTRING_LONG addresses larger payloads, while JSPREPSTRING handles short values.

Tables Accessed

The package reads from four APPS synonyms: AP_CARD_PROGRAMS (card program definition and its currency), AP_CARD_PROFILES (card profile setup data), AP_SYSTEM_PARAMETERS (Payables system-level defaults), and AK_FLOW_REGION_RELATIONS (AK framework region/flow relationships used by GETAKPAGEROWID). Lookup and currency data are sourced from the AP lookup codes and FND currency views referenced in the body.

Usage Notes

AP_CARD_DATABASE_PKG is invoked internally by the Payables card-management forms and by helper packages that build the card UI; the ETRM reports zero packages referencing it, reinforcing that it is a leaf-level utility. Customizations should avoid direct calls, since signatures are not published. When troubleshooting, the RAISEEXCEPTION-embedded procedure name is the most useful diagnostic, pinpointing the failing data-access routine.