IN_SDWCPO1_OPRV

(SQL View)
Index Back

PO Past Due

oprid security - Realtime

SELECT 'IN_SDWC_PO_PASTDUE' , 'SUP_DMD_ALERTS' , 0 , %subrec(IN_PO_NKEY_SBR, D) , S.DUE_DT , D.BUSINESS_UNIT_IN , D.QTY_PO , D.QTY_PO_STD_EXP , CASE WHEN R.QTY_DS_ACCPT_SUOM IS NULL THEN 0 ELSE R.QTY_DS_ACCPT_SUOM END , D.MERCHANDISE_AMT , D.MERCH_AMT_BSE , D.CURRENCY_CD , D.CURRENCY_CD_BASE , D.PEG_STATUS , D.DISTRIB_LN_STATUS , L.INV_ITEM_ID , L.UNIT_OF_MEASURE , H.PO_STATUS , H.RECV_STATUS , H.BUYER_ID , H.VENDOR_ID , H.VNDR_LOC , V.NAME1 , D.BUSINESS_UNIT %Concat '~' %Concat D.PO_ID %Concat '~' %Concat %NumToChar(D.LINE_NBR) %Concat '~' %Concat %NumToChar(D.SCHED_NBR) %Concat '~' %Concat D.DST_ACCT_TYPE %Concat '~' %Concat %NumToChar(D.DISTRIB_LINE_NUM) , '0' , 0 , SS.OPRID FROM PS_PO_LINE_DISTRIB D JOIN PS_PO_LINE_SHIP S ON %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_LINE_SHIP S) AND D.BUSINESS_UNIT_IN <> ' ' JOIN PS_SEC_BU_OPR SS ON SS.BUSINESS_UNIT = D.BUSINESS_UNIT_IN AND D.DISTRIB_LN_STATUS IN ('O' ,'P') JOIN PS_SEC_BU_OPR SS1 ON SS1.OPRID = SS.OPRID AND SS1.BUSINESS_UNIT = D.BUSINESS_UNIT AND S.DUE_DT < %CurrentDateIn AND S.CANCEL_STATUS = 'A' AND S.PRODUCTION_ID = ' ' JOIN PS_PO_LINE L ON %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_LINE L) AND L.CANCEL_STATUS = 'A' JOIN PS_PO_HDR H ON %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_HDR H) AND H.PO_TYPE <> 'KAN' AND H.PO_STATUS IN ('O' ,'PA' ,'A' ,'D') AND H.RECV_STATUS IN ('H' ,'N' ,'O' ,'P') JOIN PS_VENDOR V ON V.SETID = H.VENDOR_SETID AND V.VENDOR_ID = H.VENDOR_ID JOIN PS_SET_CNTRL_REC C ON C.SETCNTRLVALUE = L.BUSINESS_UNIT AND C.RECNAME = 'MASTER_ITEM_TBL' JOIN PS_MASTER_ITEM_TBL M ON M.SETID = C.SETID AND M.INV_ITEM_ID = L.INV_ITEM_ID LEFT OUTER JOIN PS_ATP_RECVQTY_VW R ON R.BUSINESS_UNIT_PO = D.BUSINESS_UNIT AND R.PO_ID = D.PO_ID AND R.LINE_NBR = D.LINE_NBR AND R.SCHED_NBR = D.SCHED_NBR AND R.PO_DIST_LINE_NUM = D.DISTRIB_LINE_NUM

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EOEN_PRCS_NAME Character(30) VARCHAR2(30) NOT NULL EOEN Process Name
2 EOEN_CATEGORY Character(30) VARCHAR2(30) NOT NULL EOEN Category
3 SEQ_NBR_EOEN Number(15,0) DECIMAL(15) NOT NULL EOEN Sequence Nbr
4 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
5 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
6 LINE_NBR Number(5,0) INTEGER NOT NULL Line Number: 11/24/08 - Added TARGET label [PC product]
7 SCHED_NBR Number(3,0) SMALLINT NOT NULL Schedule Number
8 DST_ACCT_TYPE Character(4) VARCHAR2(4) NOT NULL 07/20/04 st: added RCN for Advance Reconciliation 02/16/98 ebn CN#CM800-2.0 : Added for MISC type for Landed Cost Enhancement 11/11/99 llr: Added ADVP for Payables Advance Payment
9 DISTRIB_LINE_NUM Number(5,0) INTEGER NOT NULL Distribution Line
10 DUE_DT Date(10) DATE Specifies the date that a transaction is due. It is a generic field used in multiple PeopleSoft applications including Receivables Payables and Purchasing. For example it represents the date that payment is due for a voucher or the date that a scheduled shipment is due to be received.
11 BUSINESS_UNIT_IN Character(5) VARCHAR2(5) NOT NULL Inventory Unit
12 QTY_REQUESTED Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested
13 QTY_REQUESTED_BASE Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested Base
14 QTY_RECEIVED Number(16,4) DECIMAL(15,4) NOT NULL Received Qty
15 MERCHANDISE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Merchandise Amt F_KDHIL_R87H8 062804 MLM: Added new Line Amount Received Label
16 MERCH_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Base Merchandise Amount
17 CURRENCY_CD2 Character(3) VARCHAR2(3) NOT NULL Currency Code
18 CURRENCY_CD_BASE Character(3) VARCHAR2(3) NOT NULL Business Unit Base Currency
19 PEG_STATUS Character(2) VARCHAR2(2) NOT NULL 07/21/04 EGS: Created
10=Open
20=Completed
30=Canceled
40=Not Pegged
20 DISTRIB_LN_STATUS Character(1) VARCHAR2(1) NOT NULL Distribution Line Status
C=Closed
M=Mass Liquidated
O=Open
P=Unavailable for Sourcing
X=Canceled
21 INV_ITEM_ID_PO Character(18) VARCHAR2(18) NOT NULL Item Number PO
22 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage
23 PO_STATUS Character(2) VARCHAR2(2) NOT NULL PO Status
A=Approved
C=Complete
D=Dispatched
DA=Denied
I=Initial
LD=Line Denied
O=Open
PA=Pending Approval/Approved
PX=Pending Cancel
X=Canceled
24 RECV_STATUS Character(1) VARCHAR2(1) NOT NULL Receipt Status
C=Closed Receipt
H=Hold Receipt
M=Moved to Destination
N=PO Not Received
O=Open
P=PO Partially Received
R=Fully Received
X=Canceled
25 BUYER_ID Character(30) VARCHAR2(30) NOT NULL Buyer
26 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
27 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location
28 NAME1 Character(40) VARCHAR2(40) NOT NULL Name 1
29 IN_SDWC_HASH_KEY Character(60) VARCHAR2(60) NOT NULL Hash
30 EOEN_STATUS Character(1) VARCHAR2(1) NOT NULL EOEN Status
0=Open
1=Closed
31 ROWNBR Number(7,0) INTEGER NOT NULL Row number
32 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).