Search Results bank_branch




Overview

AP_BANK_BRANCHES_V is a reporting-oriented database view owned by the Oracle Payables (AP) module. Its documented purpose is to expose bank branch information for use in reports, specifically for selection lists and report parameters where a user must choose among valid, active internal bank branches. The view derives its name from the underlying AP_BANK_BRANCHES table and is listed in the ETRM (E-Business Suite Technical Reference Manual) metadata set for both Oracle EBS 12.1.1 and 12.2.2.

The view does not simply mirror AP_BANK_BRANCHES. Instead, it applies a business filter that restricts output to branches that are associated with at least one bank account whose ACCOUNT_TYPE is 'INTERNAL'. This design ensures that reports and concurrent programs referencing the view present only branches relevant to the implementing organization's own (internal) bank accounts, excluding branches tied exclusively to supplier, customer, or other external account types. As with many such reporting views, the ETRM notes that it is "not implemented in this database," indicating that the definition may be created dynamically or only materialized at runtime depending on the environment.

Underlying Base Objects

The view is defined over a single base table, AP_BANK_BRANCHES, aliased as BB in the view text. The filter is applied through a correlated EXISTS subquery against AP_BANK_ACCOUNTS (aliased BA), matching on BANK_BRANCH_ID and constraining ACCOUNT_TYPE to 'INTERNAL'. Although the documented metadata lists no referenced base objects, the view text explicitly identifies these two tables:

  • AP_BANK_BRANCHES (BB) — the primary source of bank name, branch name, and branch identifier.
  • AP_BANK_ACCOUNTS (BA) — referenced only to qualify which branches possess an internal account.

Because AP_BANK_ACCOUNTS stores the account-to-branch relationship, the join condition BA.BANK_BRANCH_ID = BB.BANK_BRANCH_ID is essential. No other columns from AP_BANK_ACCOUNTS are projected; the subquery is purely a filter, so each qualifying branch appears exactly once in the result set.

Key Columns

The view exposes two columns, both central to report parameterization:

  • BANK_BRANCH — a concatenated display string produced by BB.BANK_NAME || ' - ' || BB.BANK_BRANCH_NAME. This human-readable label combines the bank name and branch name with a hyphen separator and is intended for use in report selection lists or LOVs where a single descriptive value is preferred.
  • BANK_BRANCH_ID — the unique identifier of the bank branch (BB.BANK_BRANCH_ID). This is the value typically stored or passed as the report parameter, corresponding to the primary key of the AP_BANK_BRANCHES table.

Note that neither the separate bank name nor branch name is individually exposed; only the concatenated form and the ID are available, which reinforces the view's role as a pick-list source rather than a general-purpose data extraction object.

Common Use Cases and Queries

The view is most commonly referenced from report definitions, value sets, and simple lookup queries that need a filtered list of internal bank branches. Typical scenarios include Payables payment reports, bank reconciliation reports, and any custom concurrent program requiring the user to select a valid internal branch.

A standard query retrieves all qualifying branches for an LOV:

SELECT bank_branch
     , bank_branch_id
FROM   ap_bank_branches_v
ORDER BY bank_branch;

To resolve the branch ID captured from a report parameter back to its display label:

SELECT bank_branch
FROM   ap_bank_branches_v
WHERE  bank_branch_id = :p_branch_id;

Because the view filters on the existence of an internal account, it is not suitable for listing supplier or customer bank branches; those must be queried from AP_BANK_BRANCHES directly. Where the metadata states the view is not implemented in a given database, developers should verify its presence before relying on it in custom code, and otherwise replicate the view text against AP_BANK_BRANCHES and AP_BANK_ACCOUNTS in a local definition.