Search Results get_itemdesc_lookupcode




Overview

APPS.AP_WEB_DB_EXPTEMPLATE_PKG is a database-tier PL/SQL package body that encapsulates the server-side logic governing Oracle Internet Expenses expense report templates. Its principal responsibility is to build, validate, and expose the metadata associated with web-enabled expense report templates and the expense types (parameters) that those templates make available to end users. In Oracle EBS 12.1.1 and 12.2.2, this package sits behind the Expenses self-service pages and the associated setup forms, returning the ref cursor data sets that drive template selection, prompt rendering, and validation. The package is classified in the ETRM as API classification OTHER, and is referenced by twelve other packages, which confirms its role as a shared dependency rather than a standalone callable interface. The header comment references "$Header: apwdbetb.pls 120.8 2005/05/25", indicating a long-lived object that predates the 12.x releases and retains backward compatibility across them.

Key Procedures and Functions

The package exposes eighteen documented procedures and functions. The cursor-returning functions form the core of the web template retrieval path:

  • GetWebEnabledTemplatesCursor — returns a cursor of expense report templates whose web_enabled_flag is 'Y' and whose inactive date has not passed, filtering through IsExpTemplateWebEnabled. The source excerpt confirms this logic.
  • GetExpTypesOfTemplateCursor — returns the expense types belonging to a given template, joining AP_EXPENSE_REPORT_PARAMS to AP_LOOKUP_CODES to supply either the web-friendly prompt or the standard prompt.
  • GetAllExpenseTypesCursor, GetExpTypesCursor, GetWebExpTypesCursor, GetJustifReqdExpTypesCursor — narrower variants that return expense type populations filtered by web-enablement or by justification-required attributes.

Attribute-level accessors and validation helpers include:

  • GetTemplateName, GetExpTemplateId, GetDefaultTemplateId — resolve a template's display name and identifier, and determine the default template for a user or context.
  • GetExpTypePrompt, GetExpTypeInfo, GetPersonalParamId, GetRoundingParamId — return prompt text, descriptive information, and specific parameter identifiers used during expense entry.
  • Get_ItemDesc_LookupCode — the function matched by the user's search term; it resolves the lookup code associated with an item description used in expense template parameter processing.
  • IsExpTemplateWebEnabled, IsCustomCalculateEnabled, GetRequireReceiptAmt, GetNumWebEnabledExpTemplates — boolean and numeric predicates that gate template availability, custom calculation behavior, receipt amount requirements, and template counts.

Tables Accessed

Three tables are referenced through APPS synonyms. AP_EXPENSE_REPORTS supplies the template header records, including expense_report_id, report_type, web_enabled_flag, and inactive_date, and is the driving table for the template cursors. AP_EXPENSE_REPORT_PARAMS holds the expense type definitions attached to each template, including line_type_lookup_code, prompt, web_friendly_prompt, parameter_id, web_enabled_flag, and end_date; it is joined to AP_LOOKUP_CODES on lookup_type 'INVOICE DISTRIBUTION TYPE' to resolve distribution type descriptions. AP_SYSTEM_PARAMETERS provides system-level defaults used by the validation and defaulting functions, such as rounding and receipt-related configuration.

Usage Notes

The package is invoked primarily from the Oracle Internet Expenses self-service flows during template and expense type list rendering, and from setup and validation paths that must confirm a template is web-enabled before it is offered to a user. Because it is referenced by twelve other packages, customizations should avoid modifying its signature or return semantics; extensions are better implemented by wrapping the documented functions. Callers should treat the cursor functions as read-only queries and handle the BOOLEAN return convention documented in the source, where NO_DATA_FOUND yields FALSE. Error handling delegates to AP_WEB_DB_UTIL_PKG.RaiseException and APP_EXCEPTION.RAISE_EXCEPTION, so custom code invoking these functions should be prepared for standard EBS exception propagation. The package is consistent across 12.1.1 and 12.2.2, with no documented behavioral divergence between those releases.