IN_SDWC_PAR_VW

(SQL View)
Index Back

Overdue PAR

Record used by Query to populate EOEN context record.

SELECT '00' , D.BUSINESS_UNIT , D.DEMAND_SOURCE , D.SOURCE_BUS_UNIT , D.ORDER_NO , D.ORDER_INT_LINE_NO , D.SCHED_LINE_NBR , D.INV_ITEM_ID , D.DEMAND_LINE_NO , %CurrentDateIn , D.ORDER_NO , D.BUSINESS_UNIT %Concat '~' %Concat D.DEMAND_SOURCE %Concat '~' %Concat D.SOURCE_BUS_UNIT %Concat '~' %Concat D.ORDER_NO %Concat '~' %Concat %NumToChar(D.ORDER_INT_LINE_NO) %Concat '~' %Concat %NumToChar(D.SCHED_LINE_NBR) %Concat '~' %Concat %NumToChar(D.DEMAND_LINE_NO) FROM PS_IN_DEMAND D , PS_CART_ATTRIB_INV C WHERE D.IN_PROCESS_DATE IS NOT NULL AND D.IN_FULFILL_STATE < '60' AND D.DEMAND_SOURCE = 'IN' AND D.BUSINESS_UNIT = D.SOURCE_BUS_UNIT AND %DatePart(D.SCHED_DTTM) < %CurrentDateIn AND C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.LOCATION = D.LOCATION AND C.INV_CART_ID = C.LOCATION AND NOT EXISTS ( SELECT B.DEMAND_SOURCE FROM PS_IN_SDWC_PAR_CTX B , PS_EOEN_DASHBRD C WHERE B.IN_SDWC_DOC_TYPE = '00' AND B.BUSINESS_UNIT = D.BUSINESS_UNIT AND B.DEMAND_SOURCE = D.DEMAND_SOURCE AND B.SOURCE_BUS_UNIT = D.SOURCE_BUS_UNIT AND B.ORDER_NO = D.ORDER_NO AND B.ORDER_INT_LINE_NO = D.ORDER_INT_LINE_NO AND B.SCHED_LINE_NBR = D.SCHED_LINE_NBR AND B.DEMAND_LINE_NO = D.DEMAND_LINE_NO AND B.INV_ITEM_ID = D.INV_ITEM_ID AND B.EOEN_PRCS_NAME = C.EOEN_PRCS_NAME AND B.EOEN_CATEGORY = C.EOEN_CATEGORY AND B.SEQ_NBR_EOEN = C.SEQ_NBR_EOEN AND C.EOEN_STATUS = '0') UNION SELECT '10' , D.BUSINESS_UNIT , 'RQ' , D.BUSINESS_UNIT , D.REQ_ID , D.LINE_NBR , D.SCHED_NBR , L.INV_ITEM_ID , 0 , %CurrentDateIn , D.REQ_ID , ' ' FROM PS_REQ_LN_DISTRIB D , PS_REQ_LINE_SHIP S , PS_REQ_LINE L , PS_REQ_HDR H , PS_CART_ATTRIB_INV C WHERE C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.BUSINESS_UNIT_PO = D.BUSINESS_UNIT AND C.INV_CART_ID = D.LOCATION AND %Join(COMMON_KEYS, REQ_LINE L, REQ_HDR H) AND %Join(COMMON_KEYS, REQ_LINE_SHIP S, REQ_LINE L) AND %Join(COMMON_KEYS, REQ_LN_DISTRIB D, REQ_LINE_SHIP S) AND D.DISTRIB_LN_STATUS IN ('C','O','P','X') AND S.DUE_DT < %CurrentDateIn AND NOT EXISTS ( SELECT B.DEMAND_SOURCE FROM PS_IN_SDWC_PAR_CTX B , PS_EOEN_DASHBRD C WHERE B.IN_SDWC_DOC_TYPE = '10' AND B.BUSINESS_UNIT = D.BUSINESS_UNIT AND B.DEMAND_SOURCE = 'RQ' AND B.SOURCE_BUS_UNIT = D.BUSINESS_UNIT AND B.ORDER_NO = D.REQ_ID AND B.ORDER_INT_LINE_NO = D.LINE_NBR AND B.SCHED_LINE_NBR = D.SCHED_NBR AND B.INV_ITEM_ID = L.INV_ITEM_ID AND B.EOEN_PRCS_NAME = C.EOEN_PRCS_NAME AND B.EOEN_CATEGORY = C.EOEN_CATEGORY AND B.SEQ_NBR_EOEN = C.SEQ_NBR_EOEN AND C.EOEN_STATUS = '0') UNION SELECT '20' , D.BUSINESS_UNIT , 'PO' , D.BUSINESS_UNIT , D.PO_ID , D.LINE_NBR , D.SCHED_NBR , L.INV_ITEM_ID , 0 , %CurrentDateIn , D.PO_ID , ' ' FROM PS_PO_LINE_DISTRIB D , PS_PO_LINE_SHIP S , PS_PO_LINE L , PS_PO_HDR H , PS_CART_ATTRIB_INV C WHERE C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.BUSINESS_UNIT_PO = D.BUSINESS_UNIT AND C.INV_CART_ID = D.LOCATION AND %Join(COMMON_KEYS, PO_LINE L, PO_HDR H) AND %Join(COMMON_KEYS, PO_LINE_SHIP S, PO_LINE L) AND S.PRODUCTION_ID = ' ' AND %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_LINE_SHIP S) AND D.DISTRIB_LN_STATUS IN ('C','O','P','X') AND S.DUE_DT < %CurrentDateIn AND NOT EXISTS ( SELECT B.DEMAND_SOURCE FROM PS_IN_SDWC_PAR_CTX B , PS_EOEN_DASHBRD C WHERE B.IN_SDWC_DOC_TYPE = '20' AND B.BUSINESS_UNIT = D.BUSINESS_UNIT AND B.DEMAND_SOURCE = 'PO' AND B.SOURCE_BUS_UNIT = D.BUSINESS_UNIT AND B.ORDER_NO = D.PO_ID AND B.ORDER_INT_LINE_NO = D.LINE_NBR AND B.SCHED_LINE_NBR = D.SCHED_NBR AND B.INV_ITEM_ID = L.INV_ITEM_ID AND B.EOEN_PRCS_NAME = C.EOEN_PRCS_NAME AND B.EOEN_CATEGORY = C.EOEN_CATEGORY AND B.SEQ_NBR_EOEN = C.SEQ_NBR_EOEN AND C.EOEN_STATUS = '0')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 IN_SDWC_DOC_TYPE Character(2) VARCHAR2(2) NOT NULL Document Type
00=MSR
10=Requisition
20=Purchase Order
2 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Prompt Table: SP_BUIN_NONVW

3 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
4 SOURCE_BUS_UNIT Character(5) VARCHAR2(5) NOT NULL Source Bus Unit

Prompt Table: SP_BU_FS_NONVW

5 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
6 ORDER_INT_LINE_NO Number(5,0) INTEGER NOT NULL Order Line
7 SCHED_LINE_NBR Number(6,0) INTEGER NOT NULL Schedule Line Number
8 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
9 DEMAND_LINE_NO Number(4,0) SMALLINT NOT NULL Demand Line No
10 IN_PROCESS_DATE Date(10) DATE Process Date
11 DOCUMENT_ID Character(12) VARCHAR2(12) NOT NULL Document
12 IN_SDWC_HASH_KEY Character(60) VARCHAR2(60) NOT NULL Hash