Protected by Copyscape Web Copyright Protection Software

Pages

Search This Blog

Friday, June 28, 2013

Simple Supplier Query

I have a requirement of Getting below details in a query for 4 operating units.

  Sullpier Name, Supplier number, Supplier Site, Operating unit, Pay on receipt Flag (If it is
  Receipt then display other wise null), Invoice Summary Level(Show value),Default payment method.

Solution
---------

SELECT asp.vendor_name supplier_name,
       asp.segment1 supplier_number,
       ass.vendor_site_code supplier_site,
       hou.name operating_unit,
       decode(ass.pay_on_code,'RECEIPT',ass.pay_on_code,'') pay_on_receipt_flag,
       ass.pay_on_receipt_summary_code invoice_summary_level,
       ieppm.payment_method_code
  FROM ap_suppliers asp,
       ap_supplier_sites_all ass,
       hr_operating_units hou,
       IBY_EXTERNAL_PAYEES_ALL iepa,
       iby_ext_party_pmt_mthds ieppm
 WHERE asp.vendor_id=ass.vendor_id
   AND ass.org_id=hou.organization_id
   AND iepa.supplier_site_id=ass.vendor_site_id
   AND iepa.org_id=ass.org_id
   AND iepa.ext_payee_id = ieppm.ext_pmt_party_id
   AND ass.org_id in(81,82,83,155);

hope this will help to you.... keep watching this site for more updates or bookmark this site.

No comments:

Post a Comment