Customer addresses in Oracle EBS R12 live in the Trading Community Architecture (TCA). The chain is: site use (HZ_CUST_SITE_USES_ALL, Bill To or Ship To) → account site (HZ_CUST_ACCT_SITES_ALL, per operating unit) → party site (HZ_PARTY_SITES) → location (HZ_LOCATIONS, the actual address), with the customer name on HZ_PARTIES. The query below walks that chain for given location IDs.
SQL: customer and site for a location
SELECT hp.party_name, party_site_number, hl.address1 FROM apps.hz_cust_site_uses_all hcs, apps.hz_cust_acct_sites_all hca, apps.hz_party_sites hps, apps.hz_parties hp, apps.hz_locations hl, apps.hr_operating_units hou WHERE 1 = 1 AND hcs.cust_acct_site_id = hca.cust_acct_site_id AND hca.party_site_id = hps.party_site_id AND hps.party_id = hp.party_id AND hps.location_id = hl.location_id AND hca.org_id = hou.organization_id and hl.location_id in (575131, 575155);
Variations
- Filter on
hp.party_name,hps.party_site_numberorhcs.site_use_idinstead of location ID. - Add
hcs.site_use_code(BILL_TO, SHIP_TO) andhcs.locationto see the site purpose and its name. - Join
HZ_CUST_ACCOUNTSonhca.cust_account_idfor the account number.
How are customer addresses stored in Oracle R12 TCA?
The address is in HZ_LOCATIONS, linked to the party through HZ_PARTY_SITES, to the customer account through HZ_CUST_ACCT_SITES_ALL and to purposes like Bill To and Ship To through HZ_CUST_SITE_USES_ALL.
What is the difference between a party site and an account site?
A party site is an address of the party, shared across operating units. An account site is that address used by a customer account in one operating unit.
Related queries
- Oracle AR Remit-To Address Query
- Query to Get Customer Tax Registration Details in Oracle R12
- Query to Get Customer Bank Account Details in Oracle R12 (Oracle Payments)
- Query to Get Sales Order Header and Line Details in Oracle Apps R12
- TCA Query: Customer Party Site and Address by Location in Oracle R12
- Query to Check Shipping Exceptions on a Sales Order Line
- Query to Find AR Credit Memos Applied to an Invoice in Oracle R12
- Sales Order Line Status Query in Oracle Apps (as Shown in the Form)
- Query to Get AR Invoice SLA and GL Journal Details in Oracle R12
- Query to Get Price List Details in Oracle EBS (QP Tables)
- Query to Find All Public APIs of Oracle Apps Modules
- Oracle R12 Shipping Status and Delivery Status Query
- R12 AR Cash Receipt SLA and GL Details Query
- Oracle Apps AR Receipt Applications and SLA Details Query
- Oracle EBS Query to Get AR Invoice SLA (Subledger Accounting) Details
- Oracle AR Remit-To Address Query
- Query to Get Customer Tax Registration Details in Oracle R12
- Query to Get Sales Order Header and Line Details in Oracle Apps R12
- AR Invoice Vertex Debug XML Query in Oracle EBS
- Query to Find Serial Number Material Transaction Details in Oracle Inventory
- Query to Find Period Status for Inventory, GL, Purchasing, Payables, Receivables and Fixed Assets
- Query to Find Sales Orders That Are Shipped but Not Invoiced
- Query to Get Customer Bank Account Details in Oracle R12 (Oracle Payments)
- AutoInvoice Grouping Columns in RA_INTERFACE_LINES_ALL (OM to AR)
- Query to Find Ship Sets and Fulfillment Sets in Oracle Order Management
