Search Results g_lines_per_fetch




Overview

ZX_LINES_DET_FACTORS_PKG is an Oracle E-Business Tax (EBTax/ZX) PL/SQL package owned by APPS. Its principal business responsibility is to maintain the line-level and header-level detail factor attributes that feed the tax determination process within the E-Business Tax engine. Detail factors such as product fiscal classification, product category, intended use, assessable value, and input/output tax classification codes are the inputs the tax engine evaluates when deriving applicable tax rules and rates for a transaction line.

The package body follows the standard ETRM 12.x logging and messaging conventions. It declares standard message-level constants (G_MSG_UERROR, G_MSG_ERROR, G_MSG_SUCCESS, and the debug levels G_MSG_HIGH, G_MSG_MEDIUM, G_MSG_LOW) sourced from FND_MSG_PUB, and FND_LOG severity constants used for diagnostic output. The global constant that is most frequently searched, G_LINES_PER_FETCH, is defined as 1000. This constant governs the batch (array fetch) size applied when the package retrieves detail factor records, and governs bulk processing chunking. It is a compile-time constant, so changing it requires recompilation of the package body.

A package-wide cursor, get_lines_det_factors, accepts a ZX_API_PUB.transaction_rec_type record and selects the columns that constitute a transaction line's detail factors — including APPLICATION_ID, ENTITY_CODE, EVENT_CLASS_CODE, EVENT_TYPE_CODE, LINE_LEVEL_ACTION, TRX_ID, TRX_LINE_ID, TRX_LEVEL_TYPE, DEFAULT_TAXATION_COUNTRY, DOCUMENT_SUB_TYPE, TAX_INVOICE_DATE, TAX_INVOICE_NUMBER, LINE_INTENDED_USE, PRODUCT_FISC_CLASSIFICATION, PRODUCT_TYPE, PRODUCT_CATEGORY, USER_DEFINED_FISC_CLASS, ASSESSABLE_VALUE, INPUT_TAX_CLASSIFICATION_CODE, OUTPUT_TAX_CLASSIFICATION_CODE, USER_UPD_DET_FACTORS_FLAG, and TAX_EVENT_CLASS_CODE.

Key Procedures and Functions

  • UPDATE_LINE_DET_ATTRIBS — Updates the detail factor attributes held at the transaction line level. It is the line-granularity counterpart to the header routine and is responsible for persisting changes to line-specific detail factors such as intended use, product fiscal classification, and assessable value.
  • UPDATE_HEADER_DET_ATTRIBS — Updates detail factor attributes defined at the transaction (header) level, covering attributes that apply across the document rather than to an individual line.
  • LOCK_LINE_DET_FACTORS — Acquires the necessary lock on line detail factor records so that concurrent updates do not conflict during tax processing; it ensures data integrity when detail factors are being read or modified in the same transaction.

The package is classified as OTHER in ETRM; the documented interface consists of these three procedures.

Tables Accessed

  • ZX_LINES_DET_FACTORS — The primary table holding line-level detail factors. The update procedures write to this table, and LOCK_LINE_DET_FACTORS locks its rows to serialize concurrent modification.
  • PLITBLM — A standard Oracle Tools/SQL*Forms text table accessed via an APPS synonym, used in the retrieval path for intermediate processing of detail factor text data.

Usage Notes

The package is invoked from E-Business Tax user interfaces and processing flows. In Oracle Forms, it supports tax detail factor maintenance screens and the transaction tax workbench, where locking is needed before edits (LOCK_LINE_DET_FACTORS). Concurrent tax processing and API-driven transaction flows (through ZX_API_PUB transaction_rec_type structures) may call the update routines to refresh detail factors before tax determination runs. Custom code that manipulates detail factors should preferably use this package so the standard locking, messaging, and logging behavior is preserved rather than updating ZX_LINES_DET_FACTORS directly. When diagnosing performance issues in detail factor processing, G_LINES_PER_FETCH = 1000 defines the bulk collection size and is the tuning le