IN_WSM_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 , '110' , A.BUSINESS_UNIT %Concat X.PEG_KEY_SEPARATOR %Concat A.WO_ID , %NumToChar(A.WO_TASK_ID) %Concat X.PEG_KEY_SEPARATOR %Concat %NumToChar(A.RES_LN_NBR) , A.QTY_SCHEDULED_BASE , SUM(IP.QTY_PEGGED) , SUM(IP.QTY_COMPLETE) , SUM(IP.QTY_RECEIVED) , A.QTY_SCHEDULED_BASE , A.WO_MAT_NEED_DT , B.HASH_KEY , A.PEG_STATUS , AA.INTERNAL_STATUS , WWH.WO_TYPE , WWH.SRVC_GRP_ID , WWH.SHOP_ID FROM PS_WM_WO_SCHED_MAT A , PS_WM_WO_TSK AA , PS_WM_WO_HDR WWH , PS_WM_WO_MAT_HASH B , PS_IN_PEGGING IP , PS_INSTALLATION_IN X WHERE A.BUSINESS_UNIT = AA.BUSINESS_UNIT AND A.WO_ID = AA.WO_ID AND A.WO_TASK_ID = AA.WO_TASK_ID AND A.WO_COMMIT_FLAG < '3' 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 A.PEG_STATUS < '40' AND IP.DEMAND_HASH = B.HASH_KEY AND IP.DMD_ORDER_TYPE = '110' AND (IP.SUP_ORDER_TYPE <> '100' OR IP.PEG_STATUS <> '20') GROUP BY A.BUSINESS_UNIT, A.WO_ID, A.WO_TASK_ID, A.RES_LN_NBR, A.BUSINESS_UNIT_IN, A.INV_ITEM_ID, X.PEG_KEY_SEPARATOR, A.QTY_SCHEDULED_BASE, A.WO_MAT_NEED_DT, B.HASH_KEY, A.PEG_STATUS, AA.INTERNAL_STATUS, WWH.WO_TYPE, WWH.SRVC_GRP_ID, WWH.SHOP_ID

# 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 PEG_ORDER_KEY Character(30) VARCHAR2(30) NOT NULL Used to store the various Order Number formats in 1 field
9 PEG_LINE_KEY Character(30) VARCHAR2(30) NOT NULL Used to Store the concatenation of Line, Demand, Sched, Kit, etc in 1 field.
10 QTY_AVAILABLE Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Available
11 QTY_PEGGED Signed Number(17,4) DECIMAL(15,4) NOT NULL 06/16/04 EGS: Created.
12 QTY_COMPLETE Number(16,4) DECIMAL(15,4) NOT NULL Quantity Complete
13 QTY_RECEIVED Number(16,4) DECIMAL(15,4) NOT NULL Received Qty
14 QTY_ORDER Signed Number(17,4) DECIMAL(15,4) NOT NULL 06/21/04 EGS: Created
15 SCHED_DATE Date(10) DATE Schedule Date
16 PEG_HASH Character(28) VARCHAR2(28) NOT NULL 07/29/04 EGS: Created
17 PEG_STATUS Character(2) VARCHAR2(2) NOT NULL 07/21/04 EGS: Created
10=Open
20=Completed
30=Canceled
40=Not Pegged
18 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
19 WO_TYPE Character(5) VARCHAR2(5) NOT NULL Work Order Type
20 SRVC_GRP_ID Character(10) VARCHAR2(10) NOT NULL Service Group
21 SHOP_ID Character(10) VARCHAR2(10) NOT NULL Shop Identification