IN_SDA_QRYPP_VW(SQL View) |
Index Back |
---|---|
Sup/Dmd Dbrd Par POs & ReqsPar POs and Reqs used in the query for pivot grid |
SELECT D.BUSINESS_UNIT , D.PO_ID , D.LINE_NBR , D.SCHED_NBR , D.DISTRIB_LN_STATUS , D.QTY_PO_STD_EXP , D.LOCATION , C.CART_GROUP , L.INV_ITEM_ID , S.DUE_DT , H.PO_STATUS , H.BUYER_ID , H.VENDOR_ID , V.NAME1 , M.INV_ITEM_GROUP , M.INV_PROD_FAM_CD , M.UNIT_MEASURE_STD , CASE WHEN R.QTY_DS_ACCPT_SUOM IS NULL THEN 0 ELSE R.QTY_DS_ACCPT_SUOM END , 'PO' FROM PS_PO_LINE_DISTRIB D JOIN PS_PO_LINE_SHIP S ON %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_LINE_SHIP S) AND S.PRODUCTION_ID = ' ' JOIN PS_PO_LINE L ON %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_LINE L) JOIN PS_PO_HDR H ON %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_HDR H) AND H.PO_STATUS IN ('O' ,'PA' ,'A' ,'D' ,'C') JOIN PS_CART_ATTRIB_INV C ON C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.BUSINESS_UNIT_PO = D.BUSINESS_UNIT AND C.LOCATION = D.LOCATION JOIN PS_VENDOR V ON V.SETID = H.VENDOR_SETID AND V.VENDOR_ID = H.VENDOR_ID JOIN PS_SET_CNTRL_REC SC ON SC.SETCNTRLVALUE = L.BUSINESS_UNIT AND SC.RECNAME = 'MASTER_ITEM_TBL' JOIN PS_MASTER_ITEM_TBL M ON M.SETID = SC.SETID AND M.INV_ITEM_ID = L.INV_ITEM_ID LEFT OUTER JOIN PS_ATP_RECVQTY_VW R ON R.BUSINESS_UNIT_PO = D.BUSINESS_UNIT AND R.PO_ID = D.PO_ID AND R.LINE_NBR = D.LINE_NBR AND R.SCHED_NBR = D.SCHED_NBR AND D.DISTRIB_LN_STATUS IN ('O' ,'P') UNION SELECT D.BUSINESS_UNIT , D.REQ_ID , D.LINE_NBR , D.SCHED_NBR , D.DISTRIB_LN_STATUS , D.QTY_REQ_STD , D.LOCATION , C.CART_GROUP , L.INV_ITEM_ID , S.DUE_DT , CASE WHEN H.REQ_STATUS = 'D' THEN 'DA' ELSE %Substring(H.REQ_STATUS ,1 ,2) END , ' ' , L.VENDOR_ID , V.NAME1 , M.INV_ITEM_GROUP , M.INV_PROD_FAM_CD , M.UNIT_MEASURE_STD , 0 , 'PR' FROM PS_REQ_LN_DISTRIB D , PS_REQ_LINE_SHIP S , PS_REQ_LINE L , PS_REQ_HDR H , PS_CART_ATTRIB_INV C , PS_VENDOR V , PS_MASTER_ITEM_TBL M , PS_SET_CNTRL_REC SC WHERE H.REQ_STATUS IN ('O' ,'A', 'LA', 'C', 'P') AND V.SETID = L.VENDOR_SETID AND V.VENDOR_ID = L.VENDOR_ID AND C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.BUSINESS_UNIT_PO = D.BUSINESS_UNIT AND C.LOCATION = D.LOCATION AND L.BUSINESS_UNIT = H.BUSINESS_UNIT AND L.REQ_ID = H.REQ_ID AND S.BUSINESS_UNIT = L.BUSINESS_UNIT AND S.REQ_ID = L.REQ_ID AND S.LINE_NBR = L.LINE_NBR AND D.BUSINESS_UNIT = S.BUSINESS_UNIT AND D.REQ_ID = S.REQ_ID AND D.LINE_NBR = S.LINE_NBR AND D.SCHED_NBR = S.SCHED_NBR AND D.DISTRIB_LN_STATUS IN ('O','P') AND M.SETID = SC.SETID AND SC.SETCNTRLVALUE = L.BUSINESS_UNIT AND SC.RECNAME = 'MASTER_ITEM_TBL' AND M.INV_ITEM_ID = L.INV_ITEM_ID |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT_IN | Character(5) | VARCHAR2(5) NOT NULL | Inventory Unit |
2 | PO_ID | Character(10) | VARCHAR2(10) NOT NULL | Purchase Order |
3 | LINE_NBR | Number(5,0) | INTEGER NOT NULL | Line Number: 11/24/08 - Added TARGET label [PC product] |
4 | SCHED_NBR | Number(3,0) | SMALLINT NOT NULL | Schedule Number |
5 | DISTRIB_LN_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
Distribution Line Status
C=Closed M=Mass Liquidated O=Open P=Unavailable for Sourcing X=Canceled |
6 | QTY_REQUESTED_BASE | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | Qty Requested Base |
7 | LOCATION | Character(10) | VARCHAR2(10) NOT NULL | Location Code |
8 | CART_GROUP | Character(5) | VARCHAR2(5) NOT NULL | Par Location Group |
9 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
10 | DUE_DT | Date(10) | DATE | Specifies the date that a transaction is due. It is a generic field used in multiple PeopleSoft applications including Receivables Payables and Purchasing. For example it represents the date that payment is due for a voucher or the date that a scheduled shipment is due to be received. |
11 | 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 |
12 | BUYER_ID | Character(30) | VARCHAR2(30) NOT NULL | Buyer |
13 | VENDOR_ID | Character(10) | VARCHAR2(10) NOT NULL | Vendor Identifier |
14 | NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Name 1 |
15 | INV_ITEM_GROUP | Character(15) | VARCHAR2(15) NOT NULL | Item Group |
16 | INV_PROD_FAM_CD | Character(10) | VARCHAR2(10) NOT NULL | Family |
17 | UNIT_MEASURE_STD | Character(3) | VARCHAR2(3) NOT NULL | Standard Unit of Measure |
18 | QTY_DS_ACCPT_SUOM | Number(16,4) | DECIMAL(15,4) NOT NULL | Distributed Quantity |
19 | SUPPLY_SOURCE | Character(2) | VARCHAR2(2) NOT NULL |
Supply Source
10=PO, Not Received 20=No PO, Recvd, Not Staged 30=Staged in Staged_inf_inv 40=Staged in Staged_item_inv IN=Inventory - MSRs PO=Purchase Orders PR=Requisitions |