IN_WSP_PS_VW

(SQL View)
Index Back

IN Peg MSR Search View

06/21/04 EGS: Created

SELECT A.BUSINESS_UNIT , A.WO_ID , A.WO_TASK_ID , A.RES_LN_NBR , A.BUSINESS_UNIT_IN , A.INV_ITEM_ID , '115' , A.QTY_REQUIRED_BASE , SUM(IP.QTY_PEGGED) , SUM(IP.QTY_RECEIVED) , SUM(IP.QTY_COMPLETE) , SUM(IP.QTY_COMPLETE) , A.QTY_REQUIRED_BASE , A.DUE_DT , B.HASH_KEY , A.PEG_STATUS , AA.INTERNAL_STATUS , WWH.WO_TYPE , WWH.SRVC_GRP_ID , WWH.SHOP_ID , A.DESCR254_MIXED , C.CATEGORY_CD FROM PS_WM_WO_SCHED_PO A , PS_WM_WO_TSK AA , PS_WM_WO_HDR WWH , PS_WM_WO_PO_HASH B , PS_IN_PEGGING IP , PS_ITM_CAT_TBL C , PS_SET_CNTRL_REC D WHERE A.BUSINESS_UNIT = AA.BUSINESS_UNIT AND A.WO_ID = AA.WO_ID AND A.WO_TASK_ID = AA.WO_TASK_ID AND WWH.BUSINESS_UNIT = A.BUSINESS_UNIT AND WWH.WO_ID = A.WO_ID AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.WO_ID = B.WO_ID AND A.WO_TASK_ID = B.WO_TASK_ID AND A.RES_LN_NBR = B.RES_LN_NBR AND (IP.SUP_ORDER_TYPE <> '100' OR IP.PEG_STATUS <> '20') AND IP.DEMAND_HASH = B.HASH_KEY AND IP.DMD_ORDER_TYPE = '115' AND A.CATEGORY_ID = C.CATEGORY_ID AND C.SETID = D.SETID AND D.SETCNTRLVALUE = B.BUSINESS_UNIT AND D.RECNAME = 'ITM_CAT_TBL' AND C.EFFDT = ( SELECT MAX(C1.EFFDT) FROM PS_ITM_CAT_TBL C1 WHERE C.SETID = C1.SETID AND C.CATEGORY_TYPE = C1.CATEGORY_TYPE AND C.CATEGORY_CD = C1.CATEGORY_CD AND C.CATEGORY_ID = C1.CATEGORY_ID AND C1.EFFDT <= %CurrentDateIn ) GROUP BY A.BUSINESS_UNIT, A.WO_ID, A.WO_TASK_ID, A.RES_LN_NBR, A.BUSINESS_UNIT_IN, A.INV_ITEM_ID, A.QTY_REQUIRED_BASE, A.DUE_DT, B.HASH_KEY, A.PEG_STATUS, AA.INTERNAL_STATUS, WWH.WO_TYPE, WWH.SRVC_GRP_ID, WWH.SHOP_ID, A.DESCR254_MIXED, C.CATEGORY_CD

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 WO_ID Character(10) VARCHAR2(10) NOT NULL Work Order Identification
3 WO_TASK_ID Number(5,0) INTEGER NOT NULL Task Number
4 RES_LN_NBR Number(5,0) INTEGER NOT NULL Resource Line No.
5 BUSINESS_UNIT_IN Character(5) VARCHAR2(5) NOT NULL Inventory Unit
6 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
7 PEG_ORDER_TYPE Character(4) VARCHAR2(4) NOT NULL Used by Pegging Maintenance/Inquiry
010=Purchase
020=Production
030=Transfer Demand
035=Transfer Supply
070=Stock Request
090=Sales Order
100=Requisition
110=WO Inventory
115=WO Non-Inventory
8 QTY_AVAILABLE Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Available
9 QTY_PEGGED Signed Number(17,4) DECIMAL(15,4) NOT NULL 06/16/04 EGS: Created.
10 QTY_RECEIVED Number(16,4) DECIMAL(15,4) NOT NULL Received Qty
11 QTY_COMPLETE Number(16,4) DECIMAL(15,4) NOT NULL Quantity Complete
12 QTY_COMPLETE_PEG Number(16,4) DECIMAL(15,4) NOT NULL Quantity Complete
13 QTY_ORDER Signed Number(17,4) DECIMAL(15,4) NOT NULL 06/21/04 EGS: Created
14 SCHED_DATE Date(10) DATE Schedule Date
15 PEG_HASH Character(28) VARCHAR2(28) NOT NULL 07/29/04 EGS: Created
16 PEG_STATUS Character(2) VARCHAR2(2) NOT NULL 07/21/04 EGS: Created
10=Open
20=Completed
30=Canceled
40=Not Pegged
17 INTERNAL_STATUS Character(2) VARCHAR2(2) NOT NULL Internal Status
01=Open
02=Awaiting Schedule
03=Scheduled
04=Work In Progress
05=Complete
06=Closed
07=Canceled
08=On Hold
09=Work Order Created
18 WO_TYPE Character(5) VARCHAR2(5) NOT NULL Work Order Type
19 SRVC_GRP_ID Character(10) VARCHAR2(10) NOT NULL Service Group
20 SHOP_ID Character(10) VARCHAR2(10) NOT NULL Shop Identification
21 DESCR254_MIXED Character(254) VARCHAR2(254) NOT NULL Description
22 CATEGORY_CD Character(18) VARCHAR2(18) NOT NULL Category Code