PO_NOCNTRCT_VW1

(SQL View)
Index Back

Off Contract Spend View


SELECT H.VENDOR_SETID , H.VENDOR_ID , ' ' , H.BUSINESS_UNIT , S.CURRENCY_CD , H.PO_DT , SUM(S.MERCHANDISE_AMT) , ' ' FROM PS_PO_LINE_SHIP S , PS_PO_LINE L , PS_PO_HDR H WHERE L.BUSINESS_UNIT = H.BUSINESS_UNIT AND L.PO_ID = H.PO_ID AND L.BUSINESS_UNIT = S.BUSINESS_UNIT AND L.PO_ID = S.PO_ID AND L.LINE_NBR = S.LINE_NBR AND H.PO_STATUS = 'D' AND L.CNTRCT_ID = ' ' AND NOT EXISTS ( SELECT 'Y' FROM PS_CNTRCT_HDR CH WHERE CH.SETID = L.CNTRCT_SETID AND CH.VERSION_STATUS = 'C' AND CH.CNTRCT_STATUS = 'A' AND CH.VENDOR_ID = H.VENDOR_ID AND CH.CNTRCT_BEGIN_DT <= H.PO_DT AND (CH.CNTRCT_EXPIRE_DT IS NULL OR CH.CNTRCT_EXPIRE_DT >= H.PO_DT) AND (CH.ALLOW_OPEN_ITEM = 'Y' OR EXISTS ( SELECT 'Y' FROM PS_CNTRCT_LINE CL WHERE CL.SETID = CH.SETID AND CL.CNTRCT_ID = CH.CNTRCT_ID AND CL.VERSION_NBR = CH.VERSION_NBR AND CL.ITM_SETID = L.ITM_SETID AND CL.INV_ITEM_ID = L.INV_ITEM_ID) OR EXISTS ( SELECT 'Y' FROM PS_CNTRCT_CATEGORY CC WHERE CC.SETID = CH.SETID AND CC.CNTRCT_ID = CH.CNTRCT_ID AND CC.VERSION_NBR = CH.VERSION_NBR AND CC.CATEGORY_SETID = L.ITM_SETID AND CC.CATEGORY_ID = L.CATEGORY_ID))) GROUP BY H.VENDOR_SETID, H.VENDOR_ID, H.BUSINESS_UNIT, S.CURRENCY_CD, H.PO_DT

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
3 VENDOR_NAME_SHORT Character(14) VARCHAR2(14) NOT NULL Short Vendor Name
4 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Prompt Table: SP_BU_AP_NONVW

5 TXN_CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Transaction Currency
6 PO_DT Date(10) DATE Date
7 MERCHANDISE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Merchandise Amt F_KDHIL_R87H8 062804 MLM: Added new Line Amount Received Label
8 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location