Search Results ar_customers_v




Overview

AR_CUSTOMERS_V is a Receivables (AR) view that consolidates customer account and party information into a single reporting structure. It joins the customer account record in RA_CUSTOMERS (aliased CUST) with the associated trading party in HZ_PARTIES (aliased CUST_PARTY), and resolves several coded attributes into their human-readable meanings via Receivables lookup views. The view presents both CUSTOMER and prospective customer records, exposing the CUSTOMER_PROSPECT_CODE literal 'CUSTOMER' to distinguish it from the related prospect view.

This view is typically used for enquiry forms, concurrent programs, and integrations that require a denormalized, ready-to-query customer profile without manually joining RA_CUSTOMERS to HZ_PARTIES. A user searching for duns_number_c — the D-U-N-S number attribute — would expect to find that data on the underlying party record. However, the documented view text does not project a D-U-N-S column; it exposes the related party attributes TAX_REFERENCE, JGZZ_FISCAL_CODE, and SIC_CODE instead. A DUNS value must be sourced directly from HZ_PARTIES (or the HZ_PARTY_SITES/HZ_CUST_ACCOUNTS stack), not from this view.

Underlying Base Objects

Although the ETRM record for this view lists no referenced base objects, the view text explicitly selects from the customer/party model. Primary dependencies are:

Key Columns

  • CUSTOMER_ID — maps to CUST_ACCOUNT_ID; the primary customer account identifier.
  • CUSTOMER_NAME, CUSTOMER_NUMBER — party name and account number.
  • PARTY_ID, PARTY_NUMBER, PARTY_TYPE — party identity and whether the customer is an ORGANIZATION or PERSON.
  • STATUS, ORIG_SYSTEM_REFERENCE, CUSTOMER_CLASS_*, CUSTOMER_TYPE_*, CUSTOMER_CATEGORY_* — governance and classification fields.
  • SIC_CODE, TAX_REFERENCE, TAXPAYER_ID (JGZZ_FISCAL_CODE) — organization attributes exposed only for organization parties via DECODE.
  • PRICE_LIST_*, FREIGHT_TERM_*, SHIP_VIA, FOB_POINT_*, ORDER_TYPE_*, SALES_CHANNEL_*, WAREHOUSE_* — order-management defaults.

Common Use Cases and Queries

Typical uses include customer profile reports, validation of order-management defaults, and upstream integrations needing account-to-party mappings. A basic query:

SELECT customer_id, customer_number, customer_name, customer_class_meaning
FROM   ar_customers_v
WHERE  status = 'A';

For a specific organization with its tax identity:

SELECT customer_number, customer_name, tax_reference, taxpayer_id
FROM   ar_customers_v
WHERE  party_type = 'ORGANIZATION'
AND    customer_category_code = :category;

To obtain the D-U-N-S number sought by the user, join AR_CUSTOMERS_V back to HZ_PARTIES on PARTY_ID, since duns_number_c is not projected by this view.