Search Results gl_transfer_flag




Overview

AP_AE_HEADERS_V is a Payables accounting view that presents invoice-related accounting event headers in a denormalized, user-readable form. It joins the core accounting header table (AP_AE_HEADERS) to the accounting events table (AP_ACCOUNTING_EVENTS), the invoice table (AP_INVOICES), and a series of AP_LOOKUP_CODES aliases to convert internal codes into displayed descriptions. The view is a reporting convenience layer rather than a transactional object; the ETRM metadata notes that it is not implemented as a stored database object, meaning it is supplied as a view definition for query and integration purposes.

The view is defined as a UNION of two SELECT statements. Both branches share the same column list and business purpose; the second branch extends the same joins (the metadata excerpt truncates at the second branch's SELECT clause, but the structure and column list are identical across the union). Consumers query it to reconcile invoice accounting events that have been created, accounted, and either transferred or not transferred to the General Ledger. Because the user searched on gl_transfer_flag, that column is a central point of interest: it is exposed directly from AP_AE_HEADERS and simultaneously decoded into a human-readable status through lookup joins, allowing both programmatic filtering and descriptive reporting.

Underlying Base Objects

The documented base objects referenced by the view text are:

  • AP_AE_HEADERS (AAH) — the driving table; supplies the accounting header identity, period, date, transfer flag, and error codes.
  • AP_ACCOUNTING_EVENTS (AAE) — provides event status, event number, event type, and the source table/source ID linkage.
  • AP_INVOICES (AI) — provides the document number (invoice number) for events sourced from AP_INVOICES.
  • AP_LOOKUP_CODES (ALC1–ALC6) — six aliased instances used to translate codes into displayed field descriptions: EVENT TYPE, EVENT STATUS, POSTING EXCEPTIONS, ACCOUNTING ERROR TYPE, POSTING CATEGORY, and AWT_YES_NO.
  • GL_SETS_OF_BOOKS (GSOB) — supplies the set of books name and currency code.

The joins are largely inner joins on accounting_event_id, source_table, source_id, and lookup type/code, with outer joins (indicated by the (+) operator) applied to ALC3, ALC4, ALC5, and ALC6 because their target codes (posting exceptions, accounting error type, posting category, and transfer flag) may be null. This outer-join pattern is significant: it ensures accounting headers without a transfer error or transfer status are still returned.

Key Columns

Common Use Cases and Queries

The view supports Payables-to-GL transfer diagnostics, period-close reconciliation, and accounting event auditing.

  • Find entries not yet transferred to GL: SELECT INVOICE_NUM, GL_TRANSFER_STATUS FROM AP_AE_HEADERS_V WHERE GL_TRANSFER_FLAG = 'N';
  • Isolate transfer failures: SELECT DOCUMENT_NUMBER, GL_TRANSFER_ERROR_CODE FROM AP_AE_HEADERS_V WHERE GL_TRANSFER_ERROR_CODE IS NOT NULL;
  • Reconcile by period and ledger: SELECT ACCOUNTING_PERIOD, SET_OF_BOOKS_NAME, COUNT(*) FROM AP_AE_HEADERS_V GROUP BY ACCOUNTING_PERIOD, SET_OF_BOOKS_NAME;

Because transfer flag, error code, and status are surfaced together with invoice and event context, the view is well suited to alerting and reporting on accounting entries that require re-transfer or correction.