Search Results ap_xml_batchlevel2_v




Overview

AP_XML_BATCHLEVEL2_V is a Payables (AP) module view in Oracle E-Business Suite 12.1.1 and 12.2.2. It exposes payment batch and payment instruction header information in a flattened form intended for XML payment file generation, payment formatting programs, and downstream reporting. The view consolidates data from payment batch selection criteria, bank account definitions, organization units, and location records so that a single query returns the issuer name, batch identity, batch date, remittance address, payment category, and EFT user number associated with a payment batch.

The view is a UNION ALL of two branches. The first branch returns non-QuickCheck batches by joining payment selection criteria directly to the bank account. The second branch returns QuickCheck batches by additionally joining AP_CHECKS on CHECKRUN_NAME, which is required because QuickCheck payments are created through a different flow where the payment method is stored on the check rather than derived solely from the bank account. The DECODE on PAYMENT_METHOD_LOOKUP_CODE normalizes the internal method code 'EFT' to the external label 'ACH', reflecting the terminology used in North American payment files. The view therefore serves as a canonical source of "who is paying, from which account, on what date, and by which method" for a batch.

Underlying Base Objects

Based on the documented view text, AP_XML_BATCHLEVEL2_V is defined over the following objects:

  • AP_INVOICE_SELECTION_CRITERIA — the payment batch definition (CHECKRUN_ID, CHECKRUN_NAME, CHECK_DATE, ORG_ID, BANK_ACCOUNT_ID, PAYMENT_METHOD_LOOKUP_CODE, STATUS). This is the driving table for both branches.
  • AP_BANK_ACCOUNTS — supplies the bank account and EFT user number for the disbursing account.
  • HR_ORGANIZATION_UNITS — provides the organization (issuer) name for the paying entity.
  • HR_LOCATIONS — supplies the remittance address, city, region, country, postal code, telephone, and location description.
  • AP_CHECKS — used only in the second UNION ALL branch to resolve the payment method for QuickCheck batches.

The joins are keyed as follows: HR_LOCATIONS.LOCATION_ID = HR_ORGANIZATION_UNITS.LOCATION_ID; HR_ORGANIZATION_UNITS.ORGANIZATION_ID = AP_INVOICE_SELECTION_CRITERIA.ORG_ID; AP_INVOICE_SELECTION_CRITERIA.BANK_ACCOUNT_ID = AP_BANK_ACCOUNTS.BANK_ACCOUNT_ID. In the QuickCheck branch, AP_INVOICE_SELECTION_CRITERIA.CHECKRUN_NAME = AP_CHECKS.CHECKRUN_NAME, and the STATUS filter is restricted to 'QUICKCHECK' versus "not equal to QUICKCHECK" in the first branch. Despite the ETRM metadata listing no referenced base objects, the view text clearly depends on these five tables.

Key Columns

Common Use Cases and Queries

Typical uses include populating XML payment header segments, validating batch remittance data, and building operational reports on disbursement activity by operating unit.

SELECT batch_name, batch_date, issuer_name, payment_category,
       eft_user_number, address_line, city, state, postcode
FROM   ap_xml_batchlevel2_v
WHERE  org_id = :p_org_id
AND    batch_date >= :p_from_date
ORDER  BY batch_name;

A second common pattern retrieves header details for a single batch:

SELECT *
FROM   ap_xml_batchlevel2_v
WHERE  batch_name = :p_checkrun_name;

Because the view is normally used in a read-only reporting or XML-generation capacity, bind variables and operating unit filters should always be applied to limit the UNION ALL scan across the underlying Payables and HR tables.