PO_CA_ANALYT_VW

(SQL View)
Index Back

PO Contracts Analytics View

PO Contracts Analytics View

SELECT %Coalesce(A.SETID , 'S:NOS') , A.SETID , A.CNTRCT_ID , %Coalesce(A.SETID , 'S:NOS')|| A.CNTRCT_ID , A.VERSION_NBR , A.VENDOR_SETID , A.VENDOR_ID , E.NAME1 , A.CNTRCT_STATUS , F.XLATLONGNAME , A.CNTRCT_BEGIN_DT , A.CNTRCT_EXPIRE_DT , A.CNTRCT_STYLE , G.CNTRCT_STYLE_NAME , B.CNTRCT_LINE_NBR , B.ITM_SETID , B.INV_ITEM_ID , B.DESCR254_MIXED , B.CATEGORY_ID , H.DESCR60 , C.CAT_LINE_NBR , %Coalesce(D.BUSINESS_UNIT , 'B:NOB') , D.BUSINESS_UNIT , D.PO_ID , %Coalesce(D.BUSINESS_UNIT , 'B:NOB') || D.PO_ID , D.LINE_NBR , D.CANCEL_STATUS , D.CURRENCY_CD_BASE , SUM(D.MERCH_AMT_BSE) , 'Y' , 'N' , 'Contract' , A.CURRENCY_CD , LR.AMT_LINE_RELEASED , CR.AMT_LINE_RELEASED , A.BUYER_ID , BUY.OPRDEFNDESC , A.MSTR_CNTRCT_ID , A.MFG_ID , A.ALLOW_OPEN_ITEM , A.LAST_DTTM_UPDATE , '' , '' , 0 , 0 , 0 , 0 , 0 , 0 FROM ( ( ( ( ( ( ( ( ( ( PS_CNTRCT_HDR A LEFT OUTER JOIN PS_VENDOR E ON A.VENDOR_SETID = E.SETID AND E.VENDOR_ID = A.VENDOR_ID ) LEFT OUTER JOIN PS_PO_XLAT_VW F ON F.FIELDNAME = 'CNTRCT_STATUS' AND F.FIELDVALUE = A.CNTRCT_STATUS ) LEFT OUTER JOIN PS_CNTRCT_CATEGORY CAT ON A.SETID = CAT.SETID AND A.CNTRCT_ID = CAT.CNTRCT_ID AND A.VERSION_NBR = CAT.VERSION_NBR ) LEFT OUTER JOIN PS_CNTRCT_CAT_RLS CR ON A.SETID = CR.SETID AND A.CNTRCT_ID = CR.CNTRCT_ID AND CAT.CAT_LINE_NBR = CR.CAT_LINE_NBR ) LEFT OUTER JOIN PS_BUYER_ACTIVE_VW BUY ON A.BUYER_ID = BUY.BUYER_ID ) LEFT OUTER JOIN PS_CNTRCT_LINE B ON A.SETID = B.SETID AND A.CNTRCT_ID = B.CNTRCT_ID AND A.VERSION_NBR = B.VERSION_NBR ) LEFT OUTER JOIN PS_PO_LINE C ON C.CNTRCT_SETID = A.SETID AND A.CNTRCT_ID = C.CNTRCT_ID AND A.VERSION_NBR = C.VERSION_NBR AND B.CNTRCT_LINE_NBR = C.CNTRCT_LINE_NBR ) LEFT OUTER JOIN PS_PO_LINE_SHIP D ON C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.PO_ID = D.PO_ID AND C.LINE_NBR = D.LINE_NBR ) LEFT OUTER JOIN PS_PV_ITM_CAT_VW H ON H.SETID = B.ITM_SETID AND H.CATEGORY_ID = B.CATEGORY_ID ) LEFT OUTER JOIN PS_CNTRCT_LIN_RLS LR ON A.SETID = LR.SETID AND A.CNTRCT_ID = LR.CNTRCT_ID AND B.CNTRCT_LINE_NBR = LR.CNTRCT_LINE_NBR ) , PS_CNTRCT_STYLE G WHERE ( G.CNTRCT_STYLE = A.CNTRCT_STYLE ) GROUP BY A.SETID, A.CNTRCT_ID, A.VERSION_NBR, A.VENDOR_SETID, A.VENDOR_ID, E.NAME1, A.CNTRCT_STATUS, F.XLATLONGNAME, A.CNTRCT_BEGIN_DT, A.CNTRCT_EXPIRE_DT, A.CNTRCT_STYLE, G.CNTRCT_STYLE_NAME, B.CNTRCT_LINE_NBR, B.ITM_SETID, B.INV_ITEM_ID, B.DESCR254_MIXED, B.CATEGORY_ID, H.DESCR60, C.CAT_LINE_NBR, D.BUSINESS_UNIT, D.PO_ID, D.LINE_NBR, D.CANCEL_STATUS, D.CURRENCY_CD_BASE, A.CURRENCY_CD, LR.AMT_LINE_RELEASED, CR.AMT_LINE_RELEASED, A.BUYER_ID, BUY.OPRDEFNDESC, A.MSTR_CNTRCT_ID, A.MFG_ID, A.ALLOW_OPEN_ITEM, A.LAST_DTTM_UPDATE UNION SELECT 'S:NOS' , NULL , NULL , NULL , NULL , O.VENDOR_SETID , O.VENDOR_ID , E.NAME1 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , M.ITM_SETID , M.INV_ITEM_ID , M.DESCR254_MIXED , M.CATEGORY_ID , H.DESCR60 , M.CAT_LINE_NBR , M.BUSINESS_UNIT , M.BUSINESS_UNIT , M.PO_ID , M.BUSINESS_UNIT || M.PO_ID , M.LINE_NBR , N.CANCEL_STATUS , N.CURRENCY_CD_BASE , SUM( N.MERCH_AMT_BSE) , 'N' , 'Y' , 'Non Contract' , N.CURRENCY_CD_BASE ,NULL , NULL ,NULL ,NULL ,NULL , NULL ,NULL , O.LAST_DTTM_UPDATE , '' , '' ,0 ,0 ,0 ,0 ,0 ,0 FROM (PS_PO_HDR O LEFT OUTER JOIN PS_VENDOR E ON O.VENDOR_SETID = E.SETID AND E.VENDOR_ID = O.VENDOR_ID ) , (PS_PO_LINE M LEFT OUTER JOIN ( SELECT * FROM PS_ITM_CAT_TBL H1 WHERE H1.EFFDT = ( SELECT MAX(H_ED.EFFDT) FROM PS_ITM_CAT_TBL H_ED WHERE H1.SETID = H_ED.SETID AND H1.CATEGORY_TYPE = H_ED.CATEGORY_TYPE AND H1.CATEGORY_CD = H_ED.CATEGORY_CD AND H1.CATEGORY_ID = H_ED.CATEGORY_ID AND H_ED.EFFDT <= %CurrentDateIn) ) H ON H.CATEGORY_ID = M.CATEGORY_ID AND H.SETID = M.ITM_SETID ) , PS_PO_LINE_SHIP N WHERE M.BUSINESS_UNIT = O.BUSINESS_UNIT AND M.PO_ID = O.PO_ID AND M.BUSINESS_UNIT = N.BUSINESS_UNIT AND M.PO_ID = N.PO_ID AND M.LINE_NBR = N.LINE_NBR AND M.CNTRCT_ID = ' ' GROUP BY M.CNTRCT_SETID , M.CNTRCT_ID , O.VENDOR_SETID , O.VENDOR_ID , E.NAME1 , M.ITM_SETID , M.INV_ITEM_ID , M.DESCR254_MIXED , M.CATEGORY_ID , H.DESCR60 , M.CAT_LINE_NBR , M.BUSINESS_UNIT , M.PO_ID , M.LINE_NBR , N.CANCEL_STATUS , N.CURRENCY_CD_BASE, O.LAST_DTTM_UPDATE

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 CNTRCT_SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 CONTRACT_SETID Character(5) VARCHAR2(5) NOT NULL Contract Set ID
3 CNTRCT_ID Character(25) VARCHAR2(25) NOT NULL Buying Agreement ID
4 UNIQUE_IDENTIFIER Character(36) VARCHAR2(36) NOT NULL Generated unique identifier for accessing ledger scenario inquiry drill down criteria.
5 VERSION_NBR Number(5,0) INTEGER NOT NULL Contract Version number
6 VENDOR_SETID Character(5) VARCHAR2(5) NOT NULL Vendor SetID
7 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
8 NAME1 Character(40) VARCHAR2(40) NOT NULL Name 1
9 CNTRCT_STATUS Character(1) VARCHAR2(1) NOT NULL Contract Status
A=Approved
C=Closed
H=On-Hold
O=Open
P=Pre-Approved
X=Canceled
10 DESCR30 Character(30) VARCHAR2(30) NOT NULL Description
11 CNTRCT_BEGIN_DT Date(10) DATE Contract Begin Date
12 CNTRCT_EXPIRE_DT Date(10) DATE Expire Date
13 CNTRCT_STYLE Character(10) VARCHAR2(10) NOT NULL Contract Style
14 CNTRCT_STYLE_NAME Character(30) VARCHAR2(30) NOT NULL Style Description
15 CNTRCT_LINE_NBR Number(5,0) INTEGER NOT NULL Buying Agreement Line Nbr
16 ITM_SETID Character(5) VARCHAR2(5) NOT NULL Item SetID
17 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
18 DESCR254_MIXED Character(254) VARCHAR2(254) NOT NULL Description
19 CATEGORY_ID Character(5) VARCHAR2(5) NOT NULL Category ID
20 DESCR60 Character(60) VARCHAR2(60) NOT NULL Description
21 CAT_LINE_NBR Number(5,0) INTEGER NOT NULL Contract Category Line Number
22 BUSINESS_UNIT_PO Character(5) VARCHAR2(5) NOT NULL PO Business Unit
23 BUSINESS_UNIT_PO2 Character(5) VARCHAR2(5) NOT NULL Purchasing Business Unit
24 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
25 UNIQUE_ID Character(20) VARCHAR2(20) NOT NULL Unique ID
26 LINE_NBR Number(5,0) INTEGER NOT NULL Line Number: 11/24/08 - Added TARGET label [PC product]
27 CANCEL_STATUS Character(1) VARCHAR2(1) NOT NULL Cancel Status
A=Active
C=Closed
D=Denied
H=Hold
O=Open
P=Pending Approval
X=Canceled
28 CURRENCY_CD_BASE Character(3) VARCHAR2(3) NOT NULL Business Unit Base Currency
29 MERCH_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Base Merchandise Amount
30 CNTRCT_SPEND Character(1) VARCHAR2(1) NOT NULL PO Contract Spend
N=Non Contract
Y=Contract
31 PO_SPEND Character(1) VARCHAR2(1) NOT NULL PO Spend
N=Non PO
Y=PO
32 CONTRACT_TYPE Character(15) VARCHAR2(15) NOT NULL Contract Type
33 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
34 AMT_LINE_RELEASED Signed Number(28,3) DECIMAL(26,3) NOT NULL Total Line Amt Released
35 AMT_CAT_RELEASED Signed Number(28,3) DECIMAL(26,3) NOT NULL Total Category Amt Released
36 BUYER_ID Character(30) VARCHAR2(30) NOT NULL Buyer
37 OPRDEFNDESC Character(30) VARCHAR2(30) NOT NULL Description field for a user
38 MSTR_CNTRCT_ID Character(10) VARCHAR2(10) NOT NULL Master Contract ID
39 MFG_ID Character(50) VARCHAR2(50) NOT NULL Manufacturer ID
40 ALLOW_OPEN_ITEM Character(1) VARCHAR2(1) NOT NULL Allow Open Item Reference
N=No
Y=Yes
41 LAST_DTTM_UPDATE DateTime(26) TIMESTAMP Specifies the date and time of the last update to an entry. This field is maintained by PeopleSoft and is used in a variety of contexts.
42 PO_COLLAB_URL Character(254) VARCHAR2(254) NOT NULL 02/01/01 rml CN#WV802-1.0
43 CURR_CD_KIBANA Character(3) VARCHAR2(3) NOT NULL Insights Reporting Preferences
44 MERCH_AMT_RPT Signed Number(28,3) DECIMAL(26,3) NOT NULL Report Merchandise Amount
45 AMT_LINE_RELEASED2 Signed Number(28,3) DECIMAL(26,3) NOT NULL Total Line Amt Released
46 MERCH_AMT_CAT Signed Number(28,3) DECIMAL(26,3) NOT NULL Category Currency Merch Amt
47 AMT_CNTRCT_MAX Number(27,3) DECIMAL(26,3) NOT NULL Maximum Amount of Contract.
48 AMT_REMAINING Signed Number(28,3) DECIMAL(26,3) NOT NULL Remaining Amount
49 TOTAL_PCT Number(6,2) DECIMAL(5,2) NOT NULL Total Percent