SCP_RCVPOSHP_VW(SQL View) |
Index Back |
---|---|
PO Line Ship ViewSupplier PO Line Ship View |
SELECT DISTINCT S.BUSINESS_UNIT , S.PO_ID , S.LINE_NBR , S.SCHED_NBR , H.PO_DT , H.PO_STATUS , H.VENDOR_ID , H.BUYER_ID , H.PYMNT_TERMS_CD , H.RECV_STATUS , H.BILL_LOCATION , H.CHNG_ORD_BATCH , H.VENDOR_SETID , H.VNDR_LOC , H.CURRENCY_CD , S.DUE_DT FROM PS_PO_HDR H , PS_PO_LINE L , PS_PO_LINE_SHIP S , PS_ITM_CAT_TBL C , PS_INSTALLATION_PO I WHERE (H.PO_STATUS = 'D' OR (H.CHNG_ORD_BATCH > 0 AND H.PO_STATUS = 'D' )) AND H.BUDGET_HDR_STATUS NOT IN ('N', 'E') AND H.MID_ROLL_STATUS = 'N' AND H.BUSINESS_UNIT = L.BUSINESS_UNIT AND H.PO_ID = L.PO_ID AND L.BUSINESS_UNIT = S.BUSINESS_UNIT AND L.PO_ID = S.PO_ID AND L.LINE_NBR = S.LINE_NBR AND L.CANCEL_STATUS = 'A' AND S.CANCEL_STATUS = 'A' AND S.SHIP_TO_CUST_ID = ' ' AND L.ITM_SETID = C.SETID AND L.CATEGORY_ID = C.CATEGORY_ID AND C.CATEGORY_TYPE = I.CATEGORY_TYPE AND L.RECV_REQ <> 'X' AND C.EFFDT = ( SELECT MAX(C2.EFFDT) FROM PS_ITM_CAT_TBL C2 WHERE C.SETID = C2.SETID AND C.CATEGORY_TYPE = C2.CATEGORY_TYPE AND C.CATEGORY_ID = C2.CATEGORY_ID AND C2.EFFDT <= %CurrentDateIn) AND ((L.AMT_ONLY_FLG = 'N' AND (S.QTY_PO > ( SELECT SUM(D.QTY_SH_NETRCV_VUOM) FROM PS_RECV_LN_SHIP D WHERE S.BUSINESS_UNIT = D.BUSINESS_UNIT_PO AND S.PO_ID = D.PO_ID AND S.LINE_NBR = D.LINE_NBR AND S.SCHED_NBR = D.SCHED_NBR AND D.RECV_SHIP_STATUS <> 'X'))) OR (L.AMT_ONLY_FLG = 'Y' AND (%Abs(S.MERCHANDISE_AMT) > ( SELECT %Abs(SUM(E.MERCHANDISE_AMT)) FROM PS_RECV_LN_SHIP E WHERE S.BUSINESS_UNIT = E.BUSINESS_UNIT_PO AND S.PO_ID = E.PO_ID AND S.LINE_NBR = E.LINE_NBR AND S.SCHED_NBR = E.SCHED_NBR AND E.RECV_SHIP_STATUS <> 'X'))) OR NOT EXISTS ( SELECT 'X'FROM PS_RECV_LN_SHIP D WHERE S.BUSINESS_UNIT = D.BUSINESS_UNIT_PO AND S.PO_ID = D.PO_ID AND S.LINE_NBR = D.LINE_NBR AND S.SCHED_NBR = D.SCHED_NBR AND D.RECV_SHIP_STATUS <> 'X')) AND NOT EXISTS ( SELECT 'X' FROM PS_PO_LN_SHIP_EXS IL WHERE S.BUSINESS_UNIT = IL.BUSINESS_UNIT AND S.PO_ID = IL.PO_ID AND S.LINE_NBR = IL.LINE_NBR AND S.SCHED_NBR = IL.SCHED_NBR AND IL.EXS_TAX_TXN_TYPE = 'DIMP') |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT_PO | Character(5) | VARCHAR2(5) NOT NULL | PO Business Unit |
2 | PO_ID | Character(10) | VARCHAR2(10) NOT NULL | Purchase Order |
3 | LINE_NBR | Number(5,0) | INTEGER NOT NULL | Line Number: 11/24/08 - Added TARGET label [PC product] |
4 | SCHED_NBR | Number(3,0) | SMALLINT NOT NULL | Schedule Number |
5 | PO_DT | Date(10) | DATE | Date |
6 | 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 |
7 | VENDOR_ID | Character(10) | VARCHAR2(10) NOT NULL | Vendor Identifier |
8 | BUYER_ID | Character(30) | VARCHAR2(30) NOT NULL | Buyer |
9 | PYMNT_TERMS_CD | Character(5) | VARCHAR2(5) NOT NULL | Specifies how the payment due date and discount due date are calculated. A payment terms code is associated with various business units bill-to customers vendors as well as sales orders purchase orders and vouchers. |
10 | 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 |
11 | BILL_LOCATION | Character(10) | VARCHAR2(10) NOT NULL | Billing Location |
12 | CHNG_ORD_BATCH | Number(3,0) | SMALLINT NOT NULL | Change Order Number |
13 | VENDOR_SETID | Character(5) | VARCHAR2(5) NOT NULL | Vendor SetID |
14 | VNDR_LOC | Character(10) | VARCHAR2(10) NOT NULL | Vendor Location |
15 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |
16 | 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. |