Thursday, January 18, 2018

Query to get the Supplier/Vendor details from oracle E-Business Suite R12.X.X

This query will give you the vendor list by site wise in EBS R12

Pass the parameter as Vendor name or from number to number.

SELECT 
PO.SEGMENT1 VENDOR_NUMBER,
PO.VENDOR_NAME,
PO.VENDOR_NAME_ALT,
PO.VENDOR_TYPE_LOOKUP_CODE,
POS.VENDOR_SITE_CODE
,VENDOR_SITE_CODE_ALT
,POS.ADDRESS_LINE1
,POS.ADDRESS_LINE2
,POS.ADDRESS_LINE3
,POS.ADDRESS_LINE4
,POS.CITY
,POS.COUNTRY
,POS.ZIP
,POS.COUNTY
,POS.STATE
,POS.INVOICE_CURRENCY_CODE
,POS.PAYMENT_CURRENCY_CODE
,POS.PAYMENT_METHOD_LOOKUP_CODE
,POS.PAY_GROUP_LOOKUP_CODE
,HR.NAME
,INACTIVE_DATE
,GLCC.CONCATENATED_SEGMENTS LIABILITY_ACCOUNT
,GLCCP.CONCATENATED_SEGMENTS PREPAY_ACCOUNT
,POS.EMAIL_ADDRESS
FROM AP_SUPPLIERS PO,AP_SUPPLIER_SITES_ALL POS
,GL_CODE_COMBINATIONS_KFV GLCC,GL_CODE_COMBINATIONS_KFV GLCCP
, HR_OPERATING_UNITS HR
WHERE PO.VENDOR_ID=POS.VENDOR_ID
AND GLCC.CODE_COMBINATION_ID=POS.ACCTS_PAY_CODE_COMBINATION_ID
AND GLCCP.CODE_COMBINATION_ID=POS.PREPAY_CODE_COMBINATION_ID
AND HR.ORGANIZATION_ID=POS.ORG_ID
AND PO.SEGMENT1 BETWEEN NVL(:P_SUPPLIER_NUMBER_FROM,PO.SEGMENT1) AND NVL(:P_SUPPLIER_NUMBER_TO,PO.SEGMENT1)
AND PO.VENDOR_NAME=NVL(:P_VENDOR_NAME,PO.VENDOR_NAME)
ORDER BY 1;

No comments:

Post a Comment