RECV_PO_SHIP_VW(SQL View) |
Index Back |
---|---|
PO Line Ship ViewDate Initials Reference # Description 12/03/2009 PRG 1937323003 Ensured that when 'Retrieve Open PO Schedules' is Unchecked PO's with/without Open Schedules are listed. 05/10/2013 BOPEN 16266886 Ensured that partial received PO negative amount-only line is listed when 'Retrieve Open PO Schedules' is checked. |
SELECT DISTINCT S.BUSINESS_UNIT , S.PO_ID , S.LINE_NBR , S.SCHED_NBR , L.AMT_ONLY_FLG , S.BUSINESS_UNIT_IN , H.BUYER_ID , C.CATEGORY_CD , L.CATEGORY_ID , 'N' , L.CLOSE_SHORT_FLG , L.CONFIG_CODE , S.CONVERSION_RATE , S.COUNTRY_SHIP_FROM , S.CURRENCY_CD , S.CURRENCY_CD_BASE , L.DESCR254_MIXED , ' ' , S.DISTRIB_MTHD_FLG , S.DUE_DT , S.DUE_TIME , H.ERS_ACTION , L.INSPECT_CD , L.INV_ITEM_ID , S.IST_TXN_FLG , L.ITM_ID_VNDR , L.ITM_SETID , ' ' , S.MATCH_LINE_OPT , S.MERCH_AMT_BSE , S.MERCH_AMT_BSE , S.MERCHANDISE_AMT , L.MFG_ID , L.MFG_ITM_ID , ' ' , S.OP_SEQUENCE , S.ORIG_PROM_DT , H.PO_DT , H.PO_TYPE , S.PRICE_PO , S.PRICE_PO_BSE , S.PRICE_PO , S.PRODUCTION_ID , S.QTY_PO , 0 , S.QTY_RECV_TOL_PCT , L.RECV_REQ , L.RELEASE_NBR , S.RJCT_OVER_TOL_FLAG , L.ROUTING_ID , S.SHIPTO_ID , S.SHIPTO_SETID , S.SHIP_TYPE_ID , L.UNIT_OF_MEASURE , H.VENDOR_ID , H.VENDOR_SETID , L.VNDR_CATALOG_ID , H.VNDR_LOC , S.REJECT_DAYS , S.REVISION , L.ORIG_INV_ITEM_ID , L.DESCR254_MIXED2 , L.PO_GROUP_ID , L.PRIMARY_UNIT , L.UNIT_ALLOC_QTY , L.UNIT_ALLOC_AMT , L.UPN_TYPE_CD , L.UPN_ID , %subrec(PUR_USR_LIN_SBR, L) , %subrec(PUR_USR_SHP_SBR, S) 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 * S.CONVERSION_RATE > ( SELECT SUM(D.QTY_SH_NETRCV_VUOM * D.CONVERSION_RATE) 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 | AMT_ONLY_FLG | Character(1) | VARCHAR2(1) NOT NULL |
Amount Only
N=No Y=Yes Y/N Table Edit |
6 | BUSINESS_UNIT_IN | Character(5) | VARCHAR2(5) NOT NULL | Inventory Unit |
7 | BUYER_ID | Character(30) | VARCHAR2(30) NOT NULL | Buyer |
8 | CATEGORY_CD | Character(18) | VARCHAR2(18) NOT NULL |
Category Code
Prompt Table: %EDITTABLE26 |
9 | CATEGORY_ID | Character(5) | VARCHAR2(5) NOT NULL | Category ID |
10 | CB_SELECT_PO | Character(1) | VARCHAR2(1) NOT NULL |
Select PO Schedule Checkbox
Y/N Table Edit Default Value: N |
11 | CLOSE_SHORT_FLG | Character(1) | VARCHAR2(1) NOT NULL | Close Short Flag |
12 | CONFIG_CODE | Character(50) | VARCHAR2(50) NOT NULL | Product Configurator |
13 | CONVERSION_RATE | Signed Number(17,8) | DECIMAL(15,8) NOT NULL | Conversion Rate |
14 | COUNTRY_IST_ORIGIN | Character(3) | VARCHAR2(3) NOT NULL | Intrastat Country of Origin |
15 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |
16 | CURRENCY_CD_BASE | Character(3) | VARCHAR2(3) NOT NULL | Business Unit Base Currency |
17 | DESCR254_MIXED | Character(254) | VARCHAR2(254) NOT NULL | Description |
18 | DETAILS_PB | Character(1) | VARCHAR2(1) NOT NULL | Details |
19 | DISTRIB_MTHD_FLG | Character(1) | VARCHAR2(1) NOT NULL |
Distribute by
A=Amount Q=Quantity |
20 | 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. |
21 | DUE_TIME | Time(15) | TIMESTAMP | Due Time |
22 | ERS_ACTION | Character(1) | VARCHAR2(1) NOT NULL |
ERS Action
N=No Y=Yes |
23 | INSPECT_CD | Character(1) | VARCHAR2(1) NOT NULL |
Inspection Required
N=No Y=Yes |
24 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
25 | IST_TXN_FLG | Character(1) | VARCHAR2(1) NOT NULL |
Intrastat Transaction Flag
N=No Y=Yes Y/N Table Edit Default Value: N |
26 | ITM_ID_VNDR | Character(50) | VARCHAR2(50) NOT NULL | Vendor Item ID |
27 | ITM_SETID | Character(5) | VARCHAR2(5) NOT NULL | Item SetID |
28 | MANUFACTURER | Character(60) | VARCHAR2(60) NOT NULL | Manufacturer Name |
29 | MATCH_LINE_OPT | Character(1) | VARCHAR2(1) NOT NULL |
Match Line Option
E=ERS F=Full Match N=Don't Match |
30 | MERCH_AMT_BSE | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Base Merchandise Amount |
31 | MERCH_AMT_PO_BSE | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Merchandise Amt PO Base |
32 | MERCHANDISE_AMT_PO | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | PO Merchandise Amount |
33 | MFG_ID | Character(50) | VARCHAR2(50) NOT NULL | Manufacturer ID |
34 | MFG_ITM_ID | Character(50) | VARCHAR2(50) NOT NULL | Manufacturer's Item ID |
35 | MODEL | Character(30) | VARCHAR2(30) NOT NULL | Model |
36 | OP_SEQUENCE | Number(4,0) | SMALLINT NOT NULL | Operation Sequence |
37 | ORIG_PROM_DT | Date(10) | DATE | Original Promise Date |
38 | PO_DT | Date(10) | DATE | Date |
39 | PO_TYPE | Character(4) | VARCHAR2(4) NOT NULL |
PO Type
GEN=General KAN=Kanban |
40 | PRICE_PO | Signed Number(17,5) | DECIMAL(15,5) NOT NULL | Purchase Order Price |
41 | PRICE_PO_BSE | Signed Number(17,5) | DECIMAL(15,5) NOT NULL | Price Base |
42 | PRICE_RECV | Signed Number(17,5) | DECIMAL(15,5) NOT NULL | Price Per Receipt UOM |
43 | PRODUCTION_ID | Character(10) | VARCHAR2(10) NOT NULL | Production ID |
44 | QTY_PO | Number(16,4) | DECIMAL(15,4) NOT NULL | Purchase Order Quantity |
45 | QTY_PRIOR_RECEIPT | Number(16,4) | DECIMAL(15,4) NOT NULL | Prior Receipt Qty |
46 | QTY_RECV_TOL_PCT | Number(6,2) | DECIMAL(5,2) NOT NULL | Qty Rcvd Tolerance % |
47 | RECV_REQ | Character(1) | VARCHAR2(1) NOT NULL |
Receiving Required
N=Optional X=Do Not Y=Required Default Value: N |
48 | RELEASE_NBR | Number(5,0) | INTEGER NOT NULL | Release Number |
49 | RJCT_OVER_TOL_FLAG | Character(1) | VARCHAR2(1) NOT NULL |
Reject Qty Over Tolerance
Y/N Table Edit |
50 | ROUTING_ID | Character(10) | VARCHAR2(10) NOT NULL |
Inspection Routing ID
Prompt Table: ROUTING_HDR |
51 | SHIPTO_ID | Character(10) | VARCHAR2(10) NOT NULL |
Ship To Location
Prompt Table: SHIPTO_TBL |
52 | SHIPTO_SETID | Character(5) | VARCHAR2(5) NOT NULL | ShipTo SetID |
53 | SHIP_TYPE_ID | Character(10) | VARCHAR2(10) NOT NULL | Ship Via Code |
54 | UNIT_OF_MEASURE | Character(3) | VARCHAR2(3) NOT NULL |
Used on an approval rule set.
MHR=Muti Hourly PER=Percentage SQF=Square Footage |
55 | VENDOR_ID | Character(10) | VARCHAR2(10) NOT NULL | Vendor Identifier |
56 | VENDOR_SETID | Character(5) | VARCHAR2(5) NOT NULL | Vendor SetID |
57 | VNDR_CATALOG_ID | Character(20) | VARCHAR2(20) NOT NULL | Vendor's Catalog Number |
58 | VNDR_LOC | Character(10) | VARCHAR2(10) NOT NULL |
Vendor Location
Prompt Table: VNDR_LOC_ORD_VW |
59 | REJECT_DAYS | Number(3,0) | SMALLINT NOT NULL | Early Ship Rjct Days |
60 | REVISION | Character(4) | VARCHAR2(4) NOT NULL | 01/27/2000 RML Added "As of" label |
61 | ORIG_INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Used to identify the original item ordered, in case an item substitution has taken place. |
62 | DESCR254_MIXED2 | Character(254) | VARCHAR2(254) NOT NULL | Long Description |
63 | PO_GROUP_ID | Character(18) | VARCHAR2(18) NOT NULL | GroupID |
64 | PRIMARY_UNIT | Character(1) | VARCHAR2(1) NOT NULL |
Primary Unit
N=No Y=Yes Y/N Table Edit Default Value: N |
65 | UNIT_ALLOC_QTY | Number(16,4) | DECIMAL(15,4) NOT NULL | Unit Allocation Qty |
66 | UNIT_ALLOC_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Unit Allocation Amt |
67 | UPN_TYPE_CD | Character(4) | VARCHAR2(4) NOT NULL | Universal Product Number Format Type |
68 | UPN_ID | Character(20) | VARCHAR2(20) NOT NULL | Universal Product Number |
69 | USER_LINE_CHAR1 | Character(1) | VARCHAR2(1) NOT NULL | Custom Character 1 |
70 | CUSTOM_C100_B1 | Character(100) | VARCHAR2(100) NOT NULL | Custom Field 1 |
71 | CUSTOM_C100_B2 | Character(100) | VARCHAR2(100) NOT NULL | Custom Field 2 |
72 | CUSTOM_C100_B3 | Character(100) | VARCHAR2(100) NOT NULL | Custom Field 3 |
73 | CUSTOM_C100_B4 | Character(100) | VARCHAR2(100) NOT NULL | Custom Field 4 |
74 | CUSTOM_DATE_B | Date(10) | DATE | Custom Date |
75 | CUSTOM_C1_B | Character(1) | VARCHAR2(1) NOT NULL | Custom Character 2 |
76 | USER_SCHED_CHAR1 | Character(1) | VARCHAR2(1) NOT NULL | Custom Character 1 |
77 | CUSTOM_C100_C1 | Character(100) | VARCHAR2(100) NOT NULL | Custom Field 1 |
78 | CUSTOM_C100_C2 | Character(100) | VARCHAR2(100) NOT NULL | Custom Field 2 |
79 | CUSTOM_C100_C3 | Character(100) | VARCHAR2(100) NOT NULL | Custom Field 3 |
80 | CUSTOM_DATE_C1 | Date(10) | DATE | Custom Date 1 |
81 | CUSTOM_DATE_C2 | Date(10) | DATE | Custom Date 2 |
82 | CUSTOM_C1_C | Character(1) | VARCHAR2(1) NOT NULL | Custom Character 2 |