PV_MS_PO_SEL_PO

(SQL View)
Index Back

Change Order Request


SELECT DISTINCT A.BUSINESS_UNIT , A.PO_ID , B.PO_STATUS FROM PS_PO_HDR B , PS_PO_LINE_DISTRIB A WHERE B.PO_STATUS IN ('A', 'D') AND B.DISP_ACTION = 'Y' AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.PO_ID = B.PO_ID AND B.DISP_METHOD = 'EDX' AND B.HOLD_STATUS <> 'Y' AND B.BUDGET_HDR_STATUS = 'V' AND B.BUDGET_HDR_STS_NP = 'V' AND B.DOC_TOL_HDR_STATUS = 'V' AND B.MID_ROLL_STATUS = 'N' AND B.DISP_ACTION = 'Y' AND EXISTS ( SELECT 'X' FROM PS_PV_MS_SUPPLIER C WHERE C.SETID = B.VENDOR_SETID AND C.VENDOR_ID = B.VENDOR_ID AND C.PV_MS_SUP_TYPE = '1') AND (NOT EXISTS ( SELECT 'X' FROM PS_PV_MS_PO_STS_HD D WHERE A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.PO_ID = D.PO_ID) OR EXISTS ( SELECT 'X' FROM PS_PO_CHNG_ORD C WHERE B.BUSINESS_UNIT = C.BUSINESS_UNIT AND B.PO_ID = C.PO_ID))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
3 PO_STATUS Character(2) VARCHAR2(2) NOT NULL PO Status
A=Approved
C=Complete
D=Dispatched
DA=Denied
I=Initial
LD=Line Denied
O=Open
PA=Pending Approval/Approved
PX=Pending Cancel
X=Canceled