select
psv.vendor_name
,pssam.vendor_site_id
, pssv.vendor_site_code
,( select bu_name from fun_all_business_units_v where bu_id=pssv.prc_bu_id) procurement_bu
, psv.vendor_name_alt
, pssv.party_site_name
, pssv.rfq_only_site_flag
, pssv.purchasing_site_flag
, pssv.pcard_site_flag
, pssv.pay_site_flag
, pssv.primary_pay_site_flag
, pssam.fax_country_code
, pssam.fax_area_code
, pssam.fax fax
, pssv.inactive_date
, pssv.customer_num
, pssam.b2b_site_code
, wcv.carrier_name
, pssv.mode_of_transport
, pssv.service_level
, pssv.freight_terms_lookup_code
, pssv.fob_lookup_code
, pssv.terms_date_basis
, pssv.pay_group_lookup_code
, pssv.payment_priority
, term.name
, pssv.invoice_amount_limit
, pssv.pay_date_basis_lookup_code
, pssam.bank_charge_deduction_type
, pssv.always_take_disc_flag
, pssv.invoice_currency_code
, pssv.payment_currency_code
, pssv.hold_all_payments_flag
, pssv.hold_future_payments_flag
, pssv.hold_unmatched_invoices_flag
, pssv.hold_reason
, pssv.hold_by
, pssv.payment_hold_date
, pssv.hold_flag
, pssv.purchasing_hold_reason
, pssv.auto_calculate_interest_flag
, pssv.tax_reporting_site_flag
, pssv.exclude_freight_from_discount
, pssv.pay_on_code
, pssam.default_pay_site_id
, pssv.pay_on_receipt_summary_code
, pssv.match_option
, pssv.country_of_origin_code
, pssv.pay_on_use_flag
, pssv.aging_onset_point
, pssv.aging_period_days
, pssv.consumption_advice_frequency
, pssv.consumption_advice_summary
, pssv.create_debit_memo_flag
, pssv.supplier_notif_method
, pssv.email_address
, att.tolerance_name quantitytolerances
, at.tolerance_name amount_tolerance
, pssv.gapless_inv_num_flag
, pssv.selling_company_identifier
, iepa.bank_charge_bearer
, iepa.bank_instruction1_code
, iepa.bank_instruction2_code
, iepa.bank_instruction_details
, iepa.payment_reason_code
, iepa.payment_reason_comments
, iepa.delivery_channel_code
, iepa.settlement_priority
, iepa. payment_text_message1
, iepa.payment_text_message2
, iepa.payment_text_message3
, ieppm.payment_method_code
, pssv.allow_substitute_receipts_flag
, pssv.allow_unordered_receipts_flag
, pssv.enforce_ship_to_location_code
, pssv.qty_rcv_exception_code
, pssv.receipt_days_exception_code
, pssv.days_early_receipt_allowed
, pssv.days_late_receipt_allowed
, decode (pssv.receipt_required_flag,
'y', decode(pssv.inspection_required_flag,
'y', '4-way',
'n', '3-way'),
'n','2-way',
null
) matchapprovallevel
, pssam.exclude_tax_from_discount
, pssv.receiving_routing_id
, pssam.vat_code
, pssam.vat_registration_num
, iepa.remit_advice_delivery_method
, iepa. remit_advice_email
from poz_suppliers_v psv,
poz_supplier_sites_v pssv,
poz_supplier_sites_all_m pssam,
ap_tolerance_templates att,
ap_tolerance_templates at,
iby_external_payees_all iepa,
iby_ext_party_pmt_mthds ieppm,
wsh_carriers_v wcv,
ap_terms term,
fun_all_business_units_v fabv
where pssv.vendor_id=psv.vendor_id
and pssam.vendor_site_id=pssv.vendor_site_id
and term.term_id(+) = pssv.terms_id
and pssam.vendor_site_id(+)= iepa.supplier_site_id
and att.tolerance_id(+) = pssam.tolerance_id
and at.tolerance_id (+) = pssam.services_tolerance_id
and ieppm.ext_pmt_party_id(+)=iepa.ext_payee_id
and wcv.carrier_id(+) = pssam.carrier_id
and pssam.prc_bu_id = fabv.bu_id
No comments:
Post a Comment