Search Results get_tipv_base
Overview
APPS.AP_ETAX_UTILITY_PKG is a shared PL/SQL utility package within the Oracle E-Business Suite Payables (AP) module. Its role is to centralize helper logic used by the E-Business Tax (eTax) integration for Oracle Payables, particularly during invoice import, validation, matching, approval, and cancellation flows. Rather than embedding tax-related lookup, validation, and derivation logic in each caller, the package exposes reusable procedures and functions that return event classifications, tax lines, tax distributions, tax quotes, and contextual invoice information.
The package operates under the APPS schema and is classified as OTHER in the ETRM documentation. It has been a stable component across 12.1.1 and 12.2.2, where the eTax architecture remains the standard tax engine for Payables. Because it is referenced by eleven other AP packages, it functions as a foundational utility layer rather than a standalone business process.
Key Procedures and Functions
The package exposes 38 documented procedures and functions, which can be grouped by purpose:
- Event classification: GET_EVENT_CLASS_CODE and GET_EVENT_TYPE_CODE return the event class and event type codes used when eTax evaluates tax applicability for a given Payables transaction.
- Invoice context retrieval: GET_CORRECTED_INVOICE_INFO, GET_PREPAY_INVOICE_INFO, GET_RECEIPT_INFO, GET_PO_INFO, and GET_PREPAY_AWT_GROUP_ID gather information about corrected invoices, prepayments, receipts, purchase orders, and prepayment withholding groups, supplying the attributes eTax needs to calculate correct tax.
- Tax result handling: RETURN_TAX_LINES, RETURN_TAX_DISTRIBUTIONS, RETURN_TAX_QUOTE, and RETURN_DEFAULT_IMPORT return calculated tax lines, tax accounting distributions, tax quotes, and default import values to the calling process.
- Error handling: RETURN_ERROR_MESSAGES surfaces error messages generated during tax processing, allowing callers to report failures consistently.
- Calculation state checks: IS_TAX_ALREADY_CALC_INV, IS_TAX_ALREADY_CALC_INV_CHAR, and IS_TAX_ALREADY_DIST_INV determine whether tax has already been calculated or distributed for an invoice, preventing duplicate processing.
- Identifier and security helpers: GET_DIST_ID_FOR_TAX_DIST_ID maps a tax distribution identifier to its Payables distribution identifier, while SET_TAX_SECURITY_CONTEXT establishes the security context required for tax data access.
- Value lookup and TIPV: FIND_VAL performs a lookup operation, and GET_TIPV and GET_TIPV_BASE retrieve Tax Inclusive Payables Value (TIPV) information and its base equivalent.
Tables Accessed
The package reads and writes core Payables tables through APPS synonyms. Invoice header and line data are accessed via AP_INVOICES_ALL, AP_INVOICES, AP_INVOICE_LINES, AP_INVOICE_LINES_ALL, and AP_INVOICE_LINES_INTERFACE, which supply the transaction details needed for tax derivation. Distribution and accounting data come from AP_INVOICE_DISTRIBUTIONS_ALL, AP_INVOICE_DISTRIBUTIONS, AP_INVOICE_DISTRIBUTIONS_S, AP_EXP_REPORT_LINES_ALL, and AP_EXP_REPORT_DISTS_ALL. Batch context is obtained from AP_BATCHES_ALL, while allocation and distribution-set rules are read from AP_ALLOCATION_RULES, AP_ALLOCATION_RULE_LINES, and AP_DISTRIBUTION_SET_LINES. Error messages are handled through AP_ERRORS_GT.
Usage Notes
AP_ETAX_UTILITY_PKG is invoked indirectly by other AP packages rather than through a dedicated form or concurrent program. Documented callers include AP_AI_TABLE_HANDLER_PKG, AP_APPROVAL_PKG, AP_CANCEL_PKG, AP_ETAX_SERVICES_PKG, AP_IMPORT_VALIDATION_PKG, AP_INVOICE_LINES_PKG, AP_MATCHING_PKG, and several matching packages (AP_OTHR_CHRG_MATCH_PKG, AP_PO_AMT_MATCH_PKG, AP_RCT_AMT_MATCH_PKG, AP_RECT_MATCH_PKG), as well as recursive references within the package itself. It also participates in the invoice import path through AP_IMPORT_INVOICES_PKG.
Customizations should not modify this package directly. Extensions that require tax event codes, invoice context, or TIPV values should call the package from custom PL/SQL in the same way the standard AP packages do, respecting the signature exposed by the APPS schema.