Query to find active customer accounts and sites in oracle apps r12:
SELECT
hp.party_name "PARTY_NAME",
hp.party_number "PARTY_NUM",
DECODE(hp.status,
'A', 'Active',
'I', 'Inactive',
hp.status) "Party Status",
hca.account_name "ACCOUNT_NAME",
hca.account_number "ACCOUNT_NUM",
DECODE(hca.status,
'A', 'Active',
'I', 'Inactive',
hca.status) "Account Status",
hcas.creation_date "SITE_CREATE_DT",
DECODE(hcas.status,
'A', 'Active',
'I','Inactive') "Site Status",
hps.party_site_number "PARTY_SITE_NUMBER",
hou.name "ORG",
hcsua.site_use_code "SITE_USE_CODE",
hcsua.location "LOCATION",
col.name "COLLECTOR",
hcpc.name "PROFILE_CLASS",
rt.name "PAY_TERM",
hcp.Credit_rating "CREDIT_RATING",
hcp.credit_checking "CREDIT_CHECKING",
hcp.credit_hold "CREDIT_HOLD",
hcp.tolerance "TOLERANCE",
hcp.override_terms "OVERRIDE_TERMS",
hcpa.trx_credit_limit "TRX_CREDIT_LIMIT",
hcpa.overall_credit_limit "OVERALL_CREDIT_LIMIT",
arsc.name "STATEMENT_CYCLE",
hl.address1 "ADDRESS1",
hl.address2 "ADDRESS2",
hl.address3 "ADDRESS3",
hl.address4 "ADDRESS4",
hl.city "CITY",
hl.state "STATE",
hl.postal_code "ZIP_CODE",
hl.country "COUNTRY"
FROM
hz_parties hp,
hz_party_sites hps,
hz_cust_accounts_all hca,
hz_cust_acct_sites_all hcas,
hz_cust_site_uses_all hcsua,
hz_customer_profiles hcp,
hz_cust_profile_classes hcpc,
hz_cust_profile_amts hcpa,
hz_locations hl,
ar_collectors col,
AR_STATEMENT_CYCLES arsc,
hr_operating_units hou,
ra_terms rt
WHERE
1=1
AND hp.party_id = hca.party_id
AND hca.cust_account_id = hcas.cust_account_id(+)
AND hps.party_site_id(+) = hcas.party_site_id
AND hp.party_id = hcp.party_id
AND hca.cust_account_id = hcp.cust_account_id
AND hps.location_id = hl.location_id(+)
AND col.collector_id = hcp.collector_id
AND hcp.cust_account_profile_id = hcpa.cust_account_profile_id
AND hcas.cust_acct_site_id=hcsua.cust_acct_site_id
AND hcp.statement_cycle_id=arsc.statement_cycle_id
AND hcas.org_id=hou.organization_id
AND hcpc.profile_class_id=hcp.profile_class_id
AND hca.payment_term_id=rt.term_id(+)
AND hp.party_type = 'ORGANIZATION' -- only ORGANIZATION Party types
AND hp.status = 'A' -- only Active Parties/Customers
AND hca.status = 'A' --Only active sites
AND hcas.status = 'A' -- Only active sites
AND hcsua.site_use_code='BILL_TO'
AND hou.name in ('US Operating Unit','IE Operating Unit')
--AND hp.party_name like 'DELL%'
--AND hca.account_number='11506'
ORDER BY TO_NUMBER(hp.party_number), hp.party_name, hca.account_number;
SELECT
hp.party_name "PARTY_NAME",
hp.party_number "PARTY_NUM",
DECODE(hp.status,
'A', 'Active',
'I', 'Inactive',
hp.status) "Party Status",
hca.account_name "ACCOUNT_NAME",
hca.account_number "ACCOUNT_NUM",
DECODE(hca.status,
'A', 'Active',
'I', 'Inactive',
hca.status) "Account Status",
hcas.creation_date "SITE_CREATE_DT",
DECODE(hcas.status,
'A', 'Active',
'I','Inactive') "Site Status",
hps.party_site_number "PARTY_SITE_NUMBER",
hou.name "ORG",
hcsua.site_use_code "SITE_USE_CODE",
hcsua.location "LOCATION",
col.name "COLLECTOR",
hcpc.name "PROFILE_CLASS",
rt.name "PAY_TERM",
hcp.Credit_rating "CREDIT_RATING",
hcp.credit_checking "CREDIT_CHECKING",
hcp.credit_hold "CREDIT_HOLD",
hcp.tolerance "TOLERANCE",
hcp.override_terms "OVERRIDE_TERMS",
hcpa.trx_credit_limit "TRX_CREDIT_LIMIT",
hcpa.overall_credit_limit "OVERALL_CREDIT_LIMIT",
arsc.name "STATEMENT_CYCLE",
hl.address1 "ADDRESS1",
hl.address2 "ADDRESS2",
hl.address3 "ADDRESS3",
hl.address4 "ADDRESS4",
hl.city "CITY",
hl.state "STATE",
hl.postal_code "ZIP_CODE",
hl.country "COUNTRY"
FROM
hz_parties hp,
hz_party_sites hps,
hz_cust_accounts_all hca,
hz_cust_acct_sites_all hcas,
hz_cust_site_uses_all hcsua,
hz_customer_profiles hcp,
hz_cust_profile_classes hcpc,
hz_cust_profile_amts hcpa,
hz_locations hl,
ar_collectors col,
AR_STATEMENT_CYCLES arsc,
hr_operating_units hou,
ra_terms rt
WHERE
1=1
AND hp.party_id = hca.party_id
AND hca.cust_account_id = hcas.cust_account_id(+)
AND hps.party_site_id(+) = hcas.party_site_id
AND hp.party_id = hcp.party_id
AND hca.cust_account_id = hcp.cust_account_id
AND hps.location_id = hl.location_id(+)
AND col.collector_id = hcp.collector_id
AND hcp.cust_account_profile_id = hcpa.cust_account_profile_id
AND hcas.cust_acct_site_id=hcsua.cust_acct_site_id
AND hcp.statement_cycle_id=arsc.statement_cycle_id
AND hcas.org_id=hou.organization_id
AND hcpc.profile_class_id=hcp.profile_class_id
AND hca.payment_term_id=rt.term_id(+)
AND hp.party_type = 'ORGANIZATION' -- only ORGANIZATION Party types
AND hp.status = 'A' -- only Active Parties/Customers
AND hca.status = 'A' --Only active sites
AND hcas.status = 'A' -- Only active sites
AND hcsua.site_use_code='BILL_TO'
AND hou.name in ('US Operating Unit','IE Operating Unit')
--AND hp.party_name like 'DELL%'
--AND hca.account_number='11506'
ORDER BY TO_NUMBER(hp.party_number), hp.party_name, hca.account_number;
E-Business Suite: Query To Find Active Customer Accounts And Sites In Oracle Apps R12 >>>>> Download Now
ReplyDelete>>>>> Download Full
E-Business Suite: Query To Find Active Customer Accounts And Sites In Oracle Apps R12 >>>>> Download LINK
>>>>> Download Now
E-Business Suite: Query To Find Active Customer Accounts And Sites In Oracle Apps R12 >>>>> Download Full
>>>>> Download LINK yJ