IN_DMD_PO_IP_VW(SQL View) |
Index Back |
---|
SELECT A.BUSINESS_UNIT , A.DEMAND_SOURCE , A.SOURCE_BUS_UNIT , A.ORDER_NO , A.ORDER_INT_LINE_NO , A.SCHED_LINE_NBR , A.INV_ITEM_ID , A.DEMAND_LINE_NO , C.BUSINESS_UNIT , C.PO_ID , C.LINE_NBR , C.SCHED_NBR , C.DISTRIB_LINE_NUM , D.HASH_KEY , '010' , C.BUSINESS_UNIT %Concat X.PEG_KEY_SEPARATOR %Concat C.PO_ID , %NUMTOCHAR(C.LINE_NBR) %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(C.SCHED_NBR) %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(C.DISTRIB_LINE_NUM) , C.QTY_PO_STD_EXP , SUM(E.QTY_PEGGED) , C.QTY_PO_STD_EXP , 'N' , S.DUE_DT , S.DUE_TIME , %Dttm(S.DUE_DT, S.DUE_TIME) , 'N' FROM PS_IN_DEMAND A , PS_PO_LINE_DISTRIB C , PS_PO_LINE_SHIP S , PS_PO_LINE L , PS_PO_HASH D , PS_IN_PEGGING E , PS_INSTALLATION_IN X WHERE C.BUSINESS_UNIT = S.BUSINESS_UNIT AND C.PO_ID = S.PO_ID AND C.LINE_NBR = S.LINE_NBR AND C.SCHED_NBR = S.SCHED_NBR AND C.BUSINESS_UNIT = L.BUSINESS_UNIT AND C.PO_ID = L.PO_ID AND C.LINE_NBR = L.LINE_NBR AND NOT EXISTS ( SELECT 'X' FROM PS_IN_DEMAND_HASH IDH , PS_IN_PEGGING IP WHERE IDH.BUSINESS_UNIT = A.BUSINESS_UNIT AND IDH.DEMAND_SOURCE = A.DEMAND_SOURCE AND IDH.SOURCE_BUS_UNIT = A.SOURCE_BUS_UNIT AND IDH.ORDER_NO = A.ORDER_NO AND IDH.ORDER_INT_LINE_NO = A.ORDER_INT_LINE_NO AND IDH.SCHED_LINE_NBR = A.SCHED_LINE_NBR AND IDH.INV_ITEM_ID = A.INV_ITEM_ID AND IDH.DEMAND_LINE_NO = A.DEMAND_LINE_NO AND IP.DEMAND_HASH = IDH.HASH_KEY AND IP.DMD_ORDER_TYPE IN ('030', '070', '090') AND IP.SUPPLY_HASH = D.HASH_KEY AND IP.SUP_ORDER_TYPE = '010' AND IP.PEG_STATUS = '10') AND C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.PO_ID = D.PO_ID AND C.LINE_NBR = D.LINE_NBR AND C.SCHED_NBR = D.SCHED_NBR AND C.DST_ACCT_TYPE = 'DST' AND C.DISTRIB_LINE_NUM = D.DISTRIB_LINE_NUM AND C.QTY_PO_STD_EXP > 0 AND NOT EXISTS ( SELECT 'X' FROM PS_RECV_LN_DISTRIB R WHERE R.BUSINESS_UNIT_PO = C.BUSINESS_UNIT AND R.PO_ID = C.PO_ID AND R.LINE_NBR = C.LINE_NBR AND R.SCHED_NBR = C.SCHED_NBR AND R.PO_DIST_LINE_NUM = C.DISTRIB_LINE_NUM AND R.RECV_DS_STATUS <> 'X') AND A.BUSINESS_UNIT = C.BUSINESS_UNIT_IN AND A.INV_ITEM_ID = L.INV_ITEM_ID AND D.HASH_KEY = E.SUPPLY_HASH AND E.SUP_ORDER_TYPE = '010' AND E.PEG_STATUS = '10' GROUP BY A.BUSINESS_UNIT, A.DEMAND_SOURCE, A.SOURCE_BUS_UNIT, A.ORDER_NO, A.ORDER_INT_LINE_NO, A.SCHED_LINE_NBR, A.INV_ITEM_ID, A.DEMAND_LINE_NO, C.BUSINESS_UNIT, C.PO_ID, C.LINE_NBR, C.SCHED_NBR, C.DISTRIB_LINE_NUM, D.HASH_KEY, C.QTY_PO_STD_EXP, S.DUE_DT, S.DUE_TIME, X.PEG_KEY_SEPARATOR |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT_IN | Character(5) | VARCHAR2(5) NOT NULL | Inventory Unit |
2 | DEMAND_SOURCE | Character(2) | VARCHAR2(2) NOT NULL |
Demand Source
IN=Material Request OM=Sales Order PL=Planning Requisition PO=Purchase Order PR=Purchasing Requisition RT=Material Return SF=Production Request WM=Work Order |
3 | SOURCE_BUS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Source Bus Unit |
4 | ORDER_NO | Character(10) | VARCHAR2(10) NOT NULL | Identifies a customer order number that appears as a reference on a receivables pending item. Date Initials Issue Description 022701 mv SP2 (F-CJORGENS-3) CSR Desktop |
5 | ORDER_INT_LINE_NO | Number(5,0) | INTEGER NOT NULL | Order Line |
6 | SCHED_LINE_NBR | Number(6,0) | INTEGER NOT NULL | Schedule Line Number |
7 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
8 | DEMAND_LINE_NO | Number(4,0) | SMALLINT NOT NULL | Demand Line No |
9 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
10 | PO_ID | Character(10) | VARCHAR2(10) NOT NULL | Purchase Order |
11 | LINE_NBR | Number(5,0) | INTEGER NOT NULL | Line Number: 11/24/08 - Added TARGET label [PC product] |
12 | SCHED_NBR | Number(3,0) | SMALLINT NOT NULL | Schedule Number |
13 | DISTRIB_LINE_NUM | Number(5,0) | INTEGER NOT NULL | Distribution Line |
14 | PEG_HASH | Character(28) | VARCHAR2(28) NOT NULL | 07/29/04 EGS: Created |
15 | 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 |
16 | PEG_ORDER_KEY | Character(30) | VARCHAR2(30) NOT NULL | Used to store the various Order Number formats in 1 field |
17 | PEG_LINE_KEY | Character(30) | VARCHAR2(30) NOT NULL | Used to Store the concatenation of Line, Demand, Sched, Kit, etc in 1 field. |
18 | QTY_AVAILABLE | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | Qty Available |
19 | BAD_PEG_QTY | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | Bad Pegged Quantity |
20 | QTY_ORDER | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | 06/21/04 EGS: Created |
21 | PEG_FLAG | Character(1) | VARCHAR2(1) NOT NULL | 06/17/04 EGS: Created. |
22 | SCHED_DATE | Date(10) | DATE | Schedule Date |
23 | SCHED_TIME | Time(15) | TIMESTAMP | Schedule Time |
24 | SCHED_DTTM | DateTime(26) | TIMESTAMP | 08/16/01 JNW (CN#PL900-1.0): Added |
25 | HARD_PEG | Character(1) | VARCHAR2(1) NOT NULL | 09/01/04 EGS: Created |