Tuesday, January 25, 2022

Query to get Customer Details in Oracle APPS R12

SELECT DISTINCT ou.name ou_name 
      ,ps.customer_id
  ,party.party_name customer_name
      ,hzca.account_number customer_number
  ,hzca.status customer_status
  ,hcsu.location
  ,hcsu.site_use_code
  ,hcsu.status location_status
  ,ps.class
  ,hcsu.site_use_id
  ,hcpc.name customer_profile_name
  ,hzl.address1 address_line1
  ,hzl.address2 address_line2
  ,hzl.address3 address_line3
  ,hzl.city
  ,hzl.state
  ,hzl.postal_code  
  ,ps.customer_site_use_id
  ,party_site.identifying_address_flag
  ,ps.trx_date
  FROM apps.hz_parties party
      ,apps.hz_party_sites party_site
  ,apps.hz_locations hzl
  ,apps.hz_cust_accounts hzca
  ,apps.hz_cust_acct_sites hcas
  ,apps.hz_cust_site_uses hcsu
  ,apps.hz_customer_profiles cust_profile
  ,apps.hz_cust_profile_classes hcpc
  ,apps.ar_payment_schedules_all ps
  ,apps.hr_operating_units ou 
 WHERE party.party_id = hzca.party_id(+) 
   AND party.party_id = cust_profile.party_id 
   AND party.party_id = party_site.party_id 
   AND party_site.party_site_id = hcas.party_site_id 
   AND party_site.location_id = hzl.location_id 
   AND hzca.cust_account_id = hcas.cust_account_id 
   AND hcas.cust_acct_site_id = hcsu.cust_acct_site_id 
   AND hzca.cust_account_id = cust_profile.cust_account_id 
   AND hzca.cust_account_id = ps.customer_id 
   AND cust_profile.profile_class_id = hcpc.profile_class_id 
   AND ps.customer_site_use_id = hcsu.site_use_id 
   AND hcsu.org_id = ou.organization_id

4 comments:

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)