SCP_OVRDUE2H_VW(SQL View) |
Index Back |
---|---|
PO's with Overdue SchedulesSupplier PO's with Overdue Schedules 2 |
SELECT DISTINCT H.BUSINESS_UNIT , H.BUYER_ID , H.PO_ID , H.PO_DT , H.PO_STATUS , H.VENDOR_ID , H.PYMNT_TERMS_CD , H.RECV_STATUS , H.BILL_LOCATION , H.CHNG_ORD_BATCH , H.VENDOR_SETID , H.VNDR_LOC , H.CURRENCY_CD FROM PS_PO_HDR H , PS_PO_LINE L , PS_PO_LINE_SHIP S , PS_PO_LN_SHIP_MTCH M , PS_VENDOR V , PS_PO_OPRDEFN_VW D , PS_ITM_CAT_TBL C , PS_INSTALLATION_PO I WHERE (H.PO_STATUS = 'D' OR (H.CHNG_ORD_BATCH > 0 AND H.PO_STATUS = 'D' )) AND H.BUDGET_HDR_STATUS NOT IN ('N', 'E') AND H.MID_ROLL_STATUS = 'N' AND H.BUSINESS_UNIT = L.BUSINESS_UNIT AND H.PO_ID = L.PO_ID AND L.BUSINESS_UNIT = S.BUSINESS_UNIT AND L.PO_ID = S.PO_ID AND L.LINE_NBR = S.LINE_NBR AND L.CANCEL_STATUS = 'A' AND S.CANCEL_STATUS = 'A' AND S.SHIP_TO_CUST_ID = ' ' AND L.ITM_SETID = C.SETID AND L.CATEGORY_ID = C.CATEGORY_ID AND C.CATEGORY_TYPE = I.CATEGORY_TYPE AND L.RECV_REQ <> 'Y' AND S.DUE_DT < %CurrentDateIn AND H.VENDOR_SETID = V.SETID AND H.VENDOR_ID = V.VENDOR_ID AND H.BUYER_ID = D.OPRID AND S.BUSINESS_UNIT = M.BUSINESS_UNIT AND S.PO_ID = M.PO_ID AND S.LINE_NBR = M.LINE_NBR AND S.SCHED_NBR = M.SCHED_NBR AND C.EFFDT = ( SELECT MAX(C2.EFFDT) FROM PS_ITM_CAT_TBL C2 WHERE C.SETID = C2.SETID AND C.CATEGORY_TYPE = C2.CATEGORY_TYPE AND C.CATEGORY_ID = C2.CATEGORY_ID AND C2.EFFDT <= %CurrentDateIn) AND ((L.AMT_ONLY_FLG = 'N' AND S.QTY_PO > M.QTY_MATCHED) OR (L.AMT_ONLY_FLG = 'Y' AND S.MERCHANDISE_AMT > M.AMT_MATCHED)) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | BUYER_ID | Character(30) | VARCHAR2(30) NOT NULL | Buyer |
3 | PO_ID | Character(10) | VARCHAR2(10) NOT NULL | Purchase Order |
4 | PO_DT | Date(10) | DATE | Date |
5 | 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 |
6 | VENDOR_ID | Character(10) | VARCHAR2(10) NOT NULL | Vendor Identifier |
7 | PYMNT_TERMS_CD | Character(5) | VARCHAR2(5) NOT NULL | Specifies how the payment due date and discount due date are calculated. A payment terms code is associated with various business units bill-to customers vendors as well as sales orders purchase orders and vouchers. |
8 | RECV_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
Receipt Status
C=Closed Receipt H=Hold Receipt M=Moved to Destination N=PO Not Received O=Open P=PO Partially Received R=Fully Received X=Canceled |
9 | BILL_LOCATION | Character(10) | VARCHAR2(10) NOT NULL | Billing Location |
10 | CHNG_ORD_BATCH | Number(3,0) | SMALLINT NOT NULL | Change Order Number |
11 | VENDOR_SETID | Character(5) | VARCHAR2(5) NOT NULL | Vendor SetID |
12 | VNDR_LOC | Character(10) | VARCHAR2(10) NOT NULL | Vendor Location |
13 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |