IN_SDWCPO_NONV

(SQL View)
Index Back

PO Past Due

no security 8/2012: exclude received po's via ps_atp_recvqty_vw

SELECT %subrec(EOEN_LOG_KEY, P) , %subrec(IN_SDWC_CTX_SBR, P) , %subrec(IN_PO_NKEY_SBR, P) , P.DUE_DT , P.BUSINESS_UNIT_IN , P.IN_SDWC_HASH_KEY , 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 , DD.EOEN_STATUS , 0 FROM PS_IN_SDWC_PO_CTX P JOIN PS_EOEN_DASHBRD DD ON %Join(COMMON_KEYS, IN_SDWC_PO_CTX P, EOEN_DASHBRD DD) AND DD.EOEN_STATUS = '0' JOIN PS_PO_LINE_DISTRIB D ON P.BUSINESS_UNIT = D.BUSINESS_UNIT AND P.PO_ID = D.PO_ID AND P.LINE_NBR = D.LINE_NBR AND P.SCHED_NBR = D.SCHED_NBR AND P.DST_ACCT_TYPE = D.DST_ACCT_TYPE AND P.DISTRIB_LINE_NUM = D.DISTRIB_LINE_NUM AND D.BUSINESS_UNIT_IN <> ' ' AND D.DISTRIB_LN_STATUS IN ('O' ,'P') JOIN PS_PO_LINE_SHIP S ON %Join(COMMON_KEYS, PO_LINE_DISTRIB D, PO_LINE_SHIP S) 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 EOEN_EMAIL_GROUP Number(10,0) DECIMAL(10) NOT NULL Email group id
5 EOEN_NOTIFY_TO Character(30) VARCHAR2(30) NOT NULL Notification receiver
6 EMAIL_ADDRESS Long Character CLOB Email Addresses
7 QRYNAME Character(30) VARCHAR2(30) NOT NULL Query Name
8 EOEN_LAST_DTTIME DateTime(26) TIMESTAMP Last Date Time
9 EOEN_EMAIL_SUBJECT Character(100) VARCHAR2(100) NOT NULL EOEN Email subject field
10 EOEC_UL_ID Character(30) VARCHAR2(30) NOT NULL Identifies the user list to be used when creating the approval process.
11 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
12 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
13 LINE_NBR Number(5,0) INTEGER NOT NULL Line Number: 11/24/08 - Added TARGET label [PC product]
14 SCHED_NBR Number(3,0) SMALLINT NOT NULL Schedule Number
15 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
16 DISTRIB_LINE_NUM Number(5,0) INTEGER NOT NULL Distribution Line
17 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.
18 BUSINESS_UNIT_IN Character(5) VARCHAR2(5) NOT NULL Inventory Unit
19 IN_SDWC_HASH_KEY Character(60) VARCHAR2(60) NOT NULL Hash
20 QTY_REQUESTED Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested
21 QTY_REQUESTED_BASE Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested Base
22 QTY_RECEIVED Number(16,4) DECIMAL(15,4) NOT NULL Received Qty
23 MERCHANDISE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Merchandise Amt F_KDHIL_R87H8 062804 MLM: Added new Line Amount Received Label
24 MERCH_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Base Merchandise Amount
25 CURRENCY_CD2 Character(3) VARCHAR2(3) NOT NULL Currency Code
26 CURRENCY_CD_BASE Character(3) VARCHAR2(3) NOT NULL Business Unit Base Currency
27 PEG_STATUS Character(2) VARCHAR2(2) NOT NULL 07/21/04 EGS: Created
10=Open
20=Completed
30=Canceled
40=Not Pegged
28 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
29 INV_ITEM_ID_PO Character(18) VARCHAR2(18) NOT NULL Item Number PO
30 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage
31 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
32 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
33 BUYER_ID Character(30) VARCHAR2(30) NOT NULL Buyer
34 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
35 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location
36 NAME1 Character(40) VARCHAR2(40) NOT NULL Name 1
37 EOEN_STATUS Character(1) VARCHAR2(1) NOT NULL EOEN Status
0=Open
1=Closed
38 ROWNBR Number(7,0) INTEGER NOT NULL Row number