AP : QUERY: Supplier Sites - Payment Details

Here is query to Fetch QUERY: Supplier Sites - Payment Details.

select
    s.segment1                              "Supplier Number",
    ass.vendor_site_code                    "Site Name",
    haou.name                               "Operating Unit",
    iv.payment_method_code                  "Payment Method Code",
    iv.payment_method_name                  "Payment Method",
    iv.inactive_date                        "End Date",
    iep.delivery_channel_code               "Delivery: Channel",
    ibi1.meaning                            "Delivery: Bank Instr 1",
    ibi2.meaning                            "Delivery: Bank Instr 2",
    iep.bank_instruction_details            "Delivery: Bank Instr Det",
    iep.settlement_priority                 "Delivery: Settlement Priority",
    iep.payment_text_message1               "Delivery: Pay Text 1",
    iep.payment_text_message2               "Delivery: Pay Text 2",
    iep.payment_text_message3               "Delivery: Pay Text 3",
    iep.exclusive_payment_flag              "Spec: Pay Each Document Alone",
    iep.bank_charge_bearer                  "Spec: Bank Charge Bearer",
    ipr.meaning                             "Spec: Payment Reason",
    iep.payment_reason_comments             "Spec: Payment Reason Comments",
    ifo.format_name                         "Spec: Payee-specified Format",  
    iep.remit_advice_delivery_method        "Rem Advice: Delivery Method",
    iep.remit_advice_email                  "Rem Advice: E-Mail",
    iep.remit_advice_fax                    "Rem Advice: Fax",
    s.vendor_id,
    s.party_id,
    iep.ext_payee_id,
    iep.bank_instruction1_code, iep.bank_instruction2_code,
    iep.payment_reason_code,
    iep.payment_format_code
from 
    ap_suppliers s,
    ap_supplier_sites ass,
    hr_all_organization_units haou,
    (select ieppm.ext_pmt_party_id, ieppm.payment_method_code, ieppm.inactive_date, ipm.payment_method_name
     from   iby_ext_party_pmt_mthds ieppm, iby_payment_methods_vl ipm
     where  ieppm.primary_flag = 'Y'
     and    ieppm.payment_flow = 'DISBURSEMENTS'
     and    ipm.payment_method_code = ieppm.payment_method_code) iv,
    iby_external_payees_all iep,
    iby_bank_instructions_vl ibi1,
    iby_bank_instructions_vl ibi2,
    iby_payment_reasons_vl ipr,
    iby_formats_vl ifo
where
    1=1
and ass.vendor_id = s.vendor_id
and haou.organization_id = ass.org_id
and iep.payee_party_id = s.party_id
and iep.supplier_site_id = ass.vendor_site_id
and iv.ext_pmt_party_id (+) = iep.ext_payee_id
and ibi1.bank_instruction_code (+) = iep.bank_instruction1_code
and ibi2.bank_instruction_code (+) = iep.bank_instruction2_code
and ipr.payment_reason_code(+) = iep.payment_reason_code
and ifo.format_code(+) = iep.payment_format_code
and s.segment1 = '11208'
order by 1,2,3,4
Filed under   |