Search 800 + Posts

Nov 26, 2013

Query to retrieve Default Payment method associated with Supplier

With PO Vendors View
select pv.vendor_name, pv.vendor_id,pv.segment1,pv.party_id, epa.ext_payee_id,pm.payment_method_code
from
po_vendors pv ,
iby_external_payees_all epa,
iby_ext_party_pmt_mthds pm
where pv.party_id = epa.payee_party_id
and epa.ext_payee_id = pm.ext_pmt_party_id
and pm.primary_flag ='Y'
and pm.payment_flow='DISBURSEMENTS'
and pv.vendor_name ='TEST2'


With  HZ Parties table
select hp.party_name, hp.party_id, epa.ext_payee_id,pm.payment_method_code
from
hz_parties hp ,
iby_external_payees_all epa,
iby_ext_party_pmt_mthds pm
where hp.party_id = epa.payee_party_id
and epa.ext_payee_id = pm.ext_pmt_party_id
and pm.primary_flag ='Y'
and pm.payment_flow='DISBURSEMENTS'
and hp.party_name ='TEST2'

No comments:

Post a Comment