06/18/04 SLG Changed SCHED_LINE_NO --> SCHED_LINE_NBR

DEM_INV_PRI_VW

(SQL View)
Index Back

SELECT MIN(B.PRIORITY_RANK) , C.SETID , 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 , A.CUST_ID , A.SCHED_DTTM , A.QTY_REQUESTED , MAX(A.QTY_REQUESTED - A.QTY_BACKORDER) , MAX(A.QTY_REQUESTED_BASE - A.QTY_BACKORDER_BASE) , A.QTY_BACKORDER_BASE , A.QTY_BACKORDER , A.QTY_ALLOCATED , A.QTY_ALLOC_BASE , A.UNIT_OF_MEASURE , A.PRIORITY_NBR , A.SHIP_TO_CUST_ID , A.SHIP_CUST_NAME1 , A.LOCATION , A.PARTIAL_QTY_FLAG , A.BCKORDR_CNCL_FLAG , A.DESTIN_BU , A.INTERUNIT_FLG FROM PS_IN_DEMAND A , PS_INV_PRIO_RULE B , PS_SET_CNTRL_REC C WHERE C.RECNAME = 'CUST_CGRP_LNK' AND A.BUSINESS_UNIT = C.SETCNTRLVALUE AND A.LOT_ALLOC_FLG = 'N' AND A.APPROVED_FLAG = 'Y' AND A.CONFIG_CODE = ' ' AND A.PICK_BATCH_ID = 0 AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND ((EXISTS ( SELECT 'X' FROM PS_CUST_CGRP_LNK G WHERE (G.SETID = C.SETID AND G.CUST_GRP_TYPE = 'ALOC' AND G.CUST_ID = A.CUST_ID AND (G.CUSTOMER_GROUP = B.CUSTOMER_GROUP OR B.CUSTOMER_GROUP = ' ')))) OR (NOT EXISTS ( SELECT 'X' FROM PS_CUST_CGRP_LNK G2 WHERE (G2.SETID = C.SETID AND G2.CUST_GRP_TYPE = 'ALOC' AND G2.CUST_ID = A.CUST_ID)) AND B.CUSTOMER_GROUP = ' ')) AND((A.DEMAND_SOURCE = 'OM' AND B.PRIO_DEMAND_SOURCE = 'OM') OR (A.DEMAND_SOURCE <> 'OM' AND A.INTERUNIT_FLG = 'Y' AND B.PRIO_DEMAND_SOURCE = 'IU') OR (A.DEMAND_SOURCE <> 'OM' AND A.INTERUNIT_FLG = 'N' AND B.PRIO_DEMAND_SOURCE = 'IN') OR (A.DEMAND_SOURCE <> ' ' AND B.PRIO_DEMAND_SOURCE = ' ')) AND ((A.DEMAND_LINE_NO = 1 AND B.PRIO_ORDER_TYPE_CD = '1') OR (A.DEMAND_LINE_NO > 1 AND B.PRIO_ORDER_TYPE_CD = '2') OR (A.DEMAND_LINE_NO <> 0 AND B.PRIO_ORDER_TYPE_CD = ' ')) AND ((A.PRIORITY_NBR <= B.PRIORITY_NBR) OR (A.PRIORITY_NBR >= 0 AND B.PRIORITY_NBR = 0)) AND ((A.DESTIN_BU = B.DESTIN_BU) OR (A.DESTIN_BU <> ' ' AND B.DESTIN_BU = ' ')) GROUP BY C.SETID, 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, A.CUST_ID, A.SCHED_DTTM, A.QTY_REQUESTED, A.QTY_BACKORDER_BASE, A.QTY_BACKORDER, A.QTY_ALLOCATED, A.QTY_ALLOC_BASE, A.UNIT_OF_MEASURE, A.PRIORITY_NBR, A.SHIP_TO_CUST_ID, A.SHIP_CUST_NAME1, A.LOCATION, A.PARTIAL_QTY_FLAG, A.BCKORDR_CNCL_FLAG, A.DESTIN_BU, A.INTERUNIT_FLG

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 PRIORITY_RANK Number(3,0) SMALLINT NOT NULL Priority rank value of demand prioritization rule
2 SETID Character(5) VARCHAR2(5) NOT NULL SetID
3 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
4 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
5 SOURCE_BUS_UNIT Character(5) VARCHAR2(5) NOT NULL Source Bus Unit
6 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
7 ORDER_INT_LINE_NO Number(5,0) INTEGER NOT NULL Order Line
8 SCHED_LINE_NBR Number(6,0) INTEGER NOT NULL Schedule Line Number
9 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
10 DEMAND_LINE_NO Number(4,0) SMALLINT NOT NULL Demand Line No
11 CUST_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies an organizational entity that purchases goods or services from the enterprise. Represents the sold-to customer which is the customer organization that places orders. The CUST_ID may or may not be the same as the identifiers for the bill-to and ship-to locations.
12 SCHED_DTTM DateTime(26) TIMESTAMP 08/16/01 JNW (CN#PL900-1.0): Added
13 QTY_REQUESTED_ORIG Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested
14 QTY_REQUESTED Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested
15 QTY_REQUESTED_BASE Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested Base
16 QTY_BACKORDER_BASE Signed Number(17,4) DECIMAL(15,4) NOT NULL Backorder Base Qty
17 QTY_BACKORDER Signed Number(17,4) DECIMAL(15,4) NOT NULL Backorder Qty
18 QTY_ALLOCATED Signed Number(17,4) DECIMAL(15,4) NOT NULL Allocated quantity
19 QTY_ALLOC_BASE Signed Number(17,4) DECIMAL(15,4) NOT NULL Quantity allocation
20 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage
21 PRIORITY_NBR Number(3,0) SMALLINT NOT NULL Priority
22 SHIP_TO_CUST_ID Character(15) VARCHAR2(15) NOT NULL Ship To Customer
23 SHIP_CUST_NAME1 Character(40) VARCHAR2(40) NOT NULL Ship To Name
24 LOCATION Character(10) VARCHAR2(10) NOT NULL Location Code
25 PARTIAL_QTY_FLAG Character(1) VARCHAR2(1) NOT NULL Partial Qtys Can Ship
26 BCKORDR_CNCL_FLAG Character(1) VARCHAR2(1) NOT NULL Cancel Backorder
N=Cancel Backorder No
Y=Cancel Backorder Yes
27 DESTIN_BU Character(5) VARCHAR2(5) NOT NULL Destination Unit
28 INTERUNIT_FLG Character(1) VARCHAR2(1) NOT NULL InterUnit
N=No
Y=Yes