Introduction:
This scripts will used to extract the customer bank information in fusion.
SELECT IBY_EBA.*,hp.party_name, CA.ACCOUNT_NUMBER, cbb.bank_branch_name Branch_name
FROM hz_cust_accounts ca,
hz_parties hp,
iby_external_payers_all IBY_PAYEE,
iby_pmt_instr_uses_all IBY_PAYEE_USES ,
iby_ext_bank_accounts IBY_EBA,
CE_INDEX_BANK_BRANCHES cbb
WHERE ca.cust_account_id = IBY_PAYEE.cust_account_id
AND IBY_PAYEE_USES.ext_pmt_party_id = IBY_PAYEE.ext_payer_id
AND IBY_PAYEE.acct_site_use_id is null
— AND IBY_PAYEE_USES.payment_function = ‘CUSTOMER_PAYMENT’
AND IBY_EBA.ext_bank_account_id = IBY_PAYEE_USES.instrument_id
AND hp.party_id=ca.party_id
AND IBY_EBA.branch_id = cbb.branch_party_id (+)