Sunday, November 25, 2012
AP Supplier site Query in R12
SELECT assa.vendor_site_id ,
iep.default_payment_method_code payment_method_lookup_code,
hou.name operating_unit ,
av.vendor_name ,
av.segment1 ,
av.vendor_id ,
assa.vendor_site_code ,
assa.address_line1 ,
assa.county ,
assa.city ,
assa.state ,
assa.country ,
assa.vendor_site_code_alt ,
assa.purchasing_site_flag ,
assa.rfq_only_site_flag ,
assa.pay_site_flag ,
assa.address_line2 ,
assa.address_line3 ,
assa.address_line4 ,
assa.address_style ,
assa.zip ,
assa.province ,
assa.area_code ,
assa.phone ,
assa.inactive_date ,
assa.fax ,
assa.fax_area_code--,assa.payment_method_lookup_code
,
assa.terms_date_basis ,
assa.distribution_set_id ,
gcck.concatenated_segments accts_pay_code_combination,
cc.concatenated_segments prepay_code_combination ,
assa.pay_group_lookup_code ,
assa.terms_id ,
apt.name term_name ,
assa.invoice_amount_limit ,
assa.pay_date_basis_lookup_code ,
assa.invoice_currency_code ,
assa.payment_currency_code ,
assa.hold_all_payments_flag ,
assa.hold_future_payments_flag ,
assa.hold_reason ,
assa.hold_unmatched_invoices_flag ,
assa.allow_awt_flag ,
assa.awt_group_id ,
aw.tax_name ,
assa.bank_charge_bearer ,
assa.country_of_origin_code ,
assa.create_debit_memo_flag ,
assa.offset_tax_flag ,
assa.supplier_notif_method ,
assa.email_address ,
assa.remittance_email ,
assa.primary_pay_site_flag
FROM ap_suppliers av ,
ap_supplier_sites_all assa ,
hr_operating_units hou ,
gl_code_combinations_kfv gcck,
gl_code_combinations_kfv cc ,
IBY_EXTERNAL_PAYEES_ALL iep ,
ap_terms_tl apt ,
AP_AWT_TAX_RATES_ALL AW
WHERE av.vendor_id =assa.vendor_id
AND assa.terms_id =apt.term_id(+)
AND assa.org_id = hou.organization_id
AND gcck.code_combination_id=assa.accts_pay_code_combination_id
AND cc.code_combination_id =assa.prepay_code_combination_id
AND assa.vendor_site_id =iep.supplier_site_id
AND ASSA.AWT_GROUP_ID =AW.TAX_RATE_id(+)
--and iep.default_payment_method_code is null
AND assa.org_id= 89;
Labels:
AP
Subscribe to:
Post Comments (Atom)
This comment has been removed by a blog administrator.
ReplyDelete