Search Results fv_agency_location_codes_v




Overview

FV_AGENCY_LOCATION_CODES_V is a reporting and integration view owned by the APPS schema in Oracle E-Business Suite, delivered as part of the Federal Financials (FV) product family. Its purpose is to expose the set of distinct Agency Location Codes (ALCs) that are valid for use against internal bank accounts, together with the set of books and operating unit context in which each code applies. Agency Location Codes are the U.S. Treasury-assigned identifiers used to designate the federal agency and physical location that owns a given bank account; they are mandatory data elements in federal payment, collection, and reconciliation processing. Rather than forcing integrators and report developers to query the base bank account table directly and manually de-duplicate results, the view presents a flattened, filtered list suitable for use as a list of values, a validation source, or a lookup in custom reporting. The view is documented in ETRM and carries a VALID status in the APPS schema.

Underlying Base Objects

The ETRM description states that FV_AGENCY_LOCATION_CODES_V is based on the table AP_BANK_ACCOUNTS_ALL, and the documented view text confirms this. The view text is a UNION of two branches. The first branch selects from AP_BANK_ACCOUNTS_ALL with two predicates applied: AGENCY_LOCATION_CODE must be non-null, and ACCOUNT_TYPE must equal 'INTERNAL'. The second branch contributes a single synthetic row using SELECT 'ALL', -1, -1 FROM DUAL, which provides an "ALL" placeholder value alongside sentinel identifiers of -1 for both the set of books and the operating unit. The documented view metadata for the 12.2.2 reference additionally lists CE_BANK_ACCOUNTS, CE_BANK_ACCT_USES_ALL, FV_OPERATING_UNITS_ALL, and DUAL as referenced objects, all resolved through synonyms. This reflects the inheritance chain through which AP_BANK_ACCOUNTS_ALL is itself defined over the Cash Management bank account and bank account use tables, with FV_OPERATING_UNITS_ALL supplying the federal operating unit context. The UNION and DISTINCT constructs ensure that each unique combination of agency location code, set of books, and operating unit is returned exactly once.

Key Columns

  • AGENCY_LOCATION_CODE — The Treasury Agency Location Code associated with the internal bank account. This is the column most frequently referenced by users searching on "agency_location_code."
  • SET_OF_BOOKS_ID — The general ledger set of books identifier under which the agency location code is defined. The synthetic "ALL" row returns -1 in this column.
  • ORG_ID — The operating unit identifier associated with the bank account and its agency location code. The synthetic "ALL" row also returns -1 here.

Because the view exposes only these three columns, it functions as a compact reference list rather than a detailed transactional source.

Common Use Cases and Queries

The view is typically used to populate an agency location code list of values filtered by operating unit or set of books, to validate a user-supplied ALC in a custom concurrent program, or to drive federal payment formatting in outbound interfaces. A typical query retrieves all valid codes for a given operating unit:

  • SELECT agency_location_code FROM fv_agency_location_codes_v WHERE org_id = :p_org_id AND set_of_books_id = :p_sob_id;
  • SELECT DISTINCT agency_location_code FROM fv_agency_location_codes_v WHERE agency_location_code <> 'ALL' ORDER BY agency_location_code;
  • SELECT agency_location_code, org_id FROM fv_agency_location_codes_v WHERE set_of_books_id = :p_sob_id ORDER BY agency_location_code;

Consumers should filter or explicitly handle the 'ALL' sentinel row, since it is not a genuine Treasury location code and exists to simplify user-interface selection logic.