EM_PO_MTCH_VW

(SQL View)
Index Back

SELECT A.OPRID , E.VENDOR_SETID , F.VENDOR_ID , E.BUSINESS_UNIT , E.PO_ID , D.LINE_NBR , G.SCHED_NBR , %Substring(D.DESCR254_MIXED, 1, 30) , E.PO_DT , F.NAME1 , E.ORIGIN , E.PYMNT_TERMS_CD , E.CURRENCY_CD , G.QTY_PO - H.QTY_MATCHED , D.ITM_SETID , D.INV_ITEM_ID , G.QTY_PO , G.DISTRIB_MTHD_FLG , G.PRICE_PO , D.UNIT_OF_MEASURE , D.CNTRCT_ID , D.VERSION_NBR , D.CNTRCT_LINE_NBR , D.CAT_LINE_NBR , D.RELEASE_NBR , G.vat_applicability , G.tax_cd_vat , G.vat_txn_type_cd , G.vat_use_id , G.vat_treatment , G.vat_treatment_grp , G.tax_cd_sut , G.sut_excptn_type , G.sut_excptn_certif , G.sut_applicability ,CASE WHEN D.AMT_ONLY_FLG = 'Y' THEN G.merchandise_amt - H.amt_matched ELSE %Round(%DecMult(G.PRICE_PO, (G.QTY_PO-H.QTY_MATCHED)), 3) END , E.BUYER_ID , G.SHIPTO_ID , G.SUT_BASE_ID , G.TAX_FRGHT_FLG , G.TAX_MISC_FLG , G.TAX_VAT_FLG , G.FREIGHT_TERMS , G.ULTIMATE_USE_CD , D.PHYSICAL_NATURE , G.VAT_RCRD_INPT_FLG , G.VAT_RCRD_OUTPT_FLG , G.VAT_DCLRTN_POINT , G.VAT_CALC_GROSS_NET , G.VAT_CALC_FRGHT_FLG , G.VAT_CALC_MISC_FLG , G.VAT_RECALC_FLG , G.VAT_EXCPTN_TYPE , G.VAT_EXCPTN_CERTIF , G.COUNTRY_SHIP_TO , G.COUNTRY_SHIP_FROM , G.COUNTRY_VAT_BILLTO , G.COUNTRY_VAT_BILLFR , G.COUNTRY_VAT_PERFRM , G.COUNTRY_LOC_BUYER , G.COUNTRY_LOC_SELLER , G.COUNTRY_VAT_SUPPLY , G.STATE_LOC_BUYER , G.STATE_LOC_SELLER , G.STATE_SHIP_FROM , G.STATE_SHIP_TO , G.STATE_VAT_DEFAULT , G.STATE_VAT_PERFRM , G.STATE_VAT_SUPPLY , G.VAT_RGSTRN_SELLER , G.VAT_CALC_TYPE , G.VAT_ROUND_RULE , D.CATEGORY_ID , G.SHIP_TYPE_ID , D.MFG_ID , D.MFG_ITM_ID , D.UPN_TYPE_CD , D.UPN_ID FROM PS_VENDOR_USER A , PS_PO_LINE_FS D , PS_PO_HDR_FS E , PS_VENDOR F , PS_PO_LINE_SHIP_FS G , PS_PO_LN_SHIP_MTCH H , PS_EM_SLR_PO_BU_VW I WHERE A.VENDOR_ID = E.VENDOR_ID AND E.VENDOR_SETID = F.SETID AND E.VENDOR_ID = F.VENDOR_ID AND D.BUSINESS_UNIT = E.BUSINESS_UNIT AND D.PO_ID = E.PO_ID AND ((E.PO_STATUS IN ('D', 'X', 'PX')) OR ((E.CHNG_ORD_BATCH > 0) AND (E.PO_STATUS IN ('D', 'X', 'PX'))) OR ((E.PO_STATUS = 'C') AND (E.MATCH_ACTION = 'N'))) AND E.ERS_ACTION = 'N' AND E.IN_PROCESS_FLG = 'N' AND E.MATCH_STATUS_PO IN ('T', 'P', 'N') AND E.MID_ROLL_STATUS = 'N' AND E.CC_USE_FLAG IN ('N',' ') AND G.BUSINESS_UNIT = H.BUSINESS_UNIT AND G.PO_ID = H.PO_ID AND D.BUSINESS_UNIT = H.BUSINESS_UNIT AND D.PO_ID = H.PO_ID AND D.LINE_NBR = H.LINE_NBR AND G.LINE_NBR = H.LINE_NBR AND G.SCHED_NBR = H.SCHED_NBR AND D.CANCEL_STATUS <> 'X' AND G.CANCEL_STATUS <> 'X' AND I.OPRID = A.OPRID AND I.SETID = E.VENDOR_SETID AND I.VENDOR_ID = E.VENDOR_ID AND I.VNDR_LOC = E.VNDR_LOC AND I.BUSINESS_UNIT_PO = E.BUSINESS_UNIT

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
2 VENDOR_SETID Character(5) VARCHAR2(5) NOT NULL Vendor SetID
3 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
4 BUSINESS_UNIT_PO Character(5) VARCHAR2(5) NOT NULL PO 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 DESCR Character(30) VARCHAR2(30) NOT NULL Description
9 PO_DT Date(10) DATE Date
10 NAME1 Character(40) VARCHAR2(40) NOT NULL Name 1
11 ORIGIN Character(3) VARCHAR2(3) NOT NULL Origin
12 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.
13 TXN_CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Transaction Currency
14 QTY_VCHR Signed Number(17,4) DECIMAL(15,4) NOT NULL Quantity Vouchered
15 ITM_SETID Character(5) VARCHAR2(5) NOT NULL Item SetID
16 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
17 QTY_PO Number(16,4) DECIMAL(15,4) NOT NULL Purchase Order Quantity
18 DISTRIB_MTHD_FLG Character(1) VARCHAR2(1) NOT NULL Distribute by
A=Amount
Q=Quantity

Default Value: Q

19 UNIT_PRICE Signed Number(17,5) DECIMAL(15,5) NOT NULL Unit Price
20 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage
21 CNTRCT_ID Character(25) VARCHAR2(25) NOT NULL Buying Agreement ID
22 VERSION_NBR Number(5,0) INTEGER NOT NULL Contract Version number
23 CNTRCT_LINE_NBR Number(5,0) INTEGER NOT NULL Buying Agreement Line Nbr
24 CAT_LINE_NBR Number(5,0) INTEGER NOT NULL Contract Category Line Number
25 RELEASE_NBR Number(5,0) INTEGER NOT NULL Release Number
26 VAT_APPLICABILITY Character(1) VARCHAR2(1) NOT NULL A flag that indicates whether or not a transaction is eligible for VAT (Value Added Tax) taxation or why it is not eligible.
E=Exempt
N=Not Applicable
O=Outside of Scope of VAT
S=Suspended
T=Taxable
V=VAT Only
X=Exonerated
27 TAX_CD_VAT Character(8) VARCHAR2(8) NOT NULL Defines the VAT (Value Added Tax) percentage (via link to the Tax Authority) and is used to retrieve VAT accounting ChartFields. The VAT code determines how the VAT amount is calculated on a transaction and how that amount is accounted and reported for.
28 VAT_TXN_TYPE_CD Character(4) VARCHAR2(4) NOT NULL Specifies a user-defined category of business transaction that is subject to VAT accounting and reporting. The VAT code and the VAT transaction type are used in conjunction with the VAT account type to obtain the ChartFields for accounting entries. Some examples of VAT Transaction Types are Exempt Sales Exempt Purchases Triangulation EU Sales and Domestic Sales.
29 VAT_USE_ID Character(6) VARCHAR2(6) NOT NULL VAT Use Type
30 VAT_TREATMENT Character(4) VARCHAR2(4) NOT NULL VAT Treatment
31 VAT_TREATMENT_GRP Character(4) VARCHAR2(4) NOT NULL VAT Treatment Group
32 TAX_CD_SUT Character(8) VARCHAR2(8) NOT NULL Tax Code - Sales and Use Tax
33 SUT_EXCPTN_TYPE Character(1) VARCHAR2(1) NOT NULL Sales/Use Tax Exception Type
D=Direct Pay
E=Exempt/Exonerated
N=None
34 SUT_EXCPTN_CERTIF Character(20) VARCHAR2(20) NOT NULL Sales/Use Tax Exception Certif
35 SUT_APPLICABILITY Character(1) VARCHAR2(1) NOT NULL Sales/Use Tax Applicability
D=Direct Pay
E=Item is Exempt
S=Sales Tax Applicable
U=Use Tax Applicable
X=Purchaser Is Exonerated
36 MERCHANDISE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Merchandise Amt F_KDHIL_R87H8 062804 MLM: Added new Line Amount Received Label
37 BUYER_ID Character(30) VARCHAR2(30) NOT NULL Buyer
38 SHIPTO_ID Character(10) VARCHAR2(10) NOT NULL Ship To Location
39 SUT_BASE_ID Character(10) VARCHAR2(10) NOT NULL Sales/Use Tax Destination
40 TAX_FRGHT_FLG Character(1) VARCHAR2(1) NOT NULL Include Freight
41 TAX_MISC_FLG Character(1) VARCHAR2(1) NOT NULL Include Misc Charges
42 TAX_VAT_FLG Character(1) VARCHAR2(1) NOT NULL Include VAT
N=No
Y=Yes
43 FREIGHT_TERMS Character(10) VARCHAR2(10) NOT NULL Freight Terms Code
44 ULTIMATE_USE_CD Character(8) VARCHAR2(8) NOT NULL Ultimate Use Code
45 PHYSICAL_NATURE Character(1) VARCHAR2(1) NOT NULL Physical Nature
G=Goods
S=Services
46 VAT_RCRD_INPT_FLG Character(1) VARCHAR2(1) NOT NULL A flag that indicates whether or not (Y or N) a business unit will pay the VAT and recover it later from the VAT tax authority. VAT input is usually associated with purchase transactions.
47 VAT_RCRD_OUTPT_FLG Character(1) VARCHAR2(1) NOT NULL A flag that indicates whether or not (Y or N) VAT will be collected by the vendor on behalf of the government. VAT output is usually associated with sales transactions.
48 VAT_DCLRTN_POINT Character(1) VARCHAR2(1) NOT NULL A flag that specifies when VAT information for sales or purchase transaction is recognized for reporting to the appropriate VAT authority. VAT is declared at invoice time, delivery time, accounting date or the time of payment.
A=At Accounting Date
D=At Delivery Time
I=At Invoice Time
P=At Payment Time
49 VAT_CALC_GROSS_NET Character(1) VARCHAR2(1) NOT NULL A flag that indicates whether VAT calculation should be done on the Gross (G) amount or on the Net (N) amount of sales or purchase transaction. When calculating VAT at net the early payment discount is applied to the goods amount before calculating the VAT. When calculating VAT at gross the VAT is initially calculated based on the gross transaction amount.
G=Calculate at Gross
N=Calculate at Net
50 VAT_CALC_FRGHT_FLG Character(1) VARCHAR2(1) NOT NULL Include Freight
51 VAT_CALC_MISC_FLG Character(1) VARCHAR2(1) NOT NULL Include Miscellaneous
52 VAT_RECALC_FLG Character(1) VARCHAR2(1) NOT NULL A flag that indicates whether or not the VAT discount amount is recalculated at payment time. This field is only used if the VAT Calculation Type (VAT_CAL_GROSS_NET) is gross.
53 VAT_EXCPTN_TYPE Character(1) VARCHAR2(1) NOT NULL A flag that specifies the reason for a VAT exemption for a customer. Suspension (S) and Exoneration (X) are examples of Exception Type.
N=None
S=Suspended
X=Exonerated
54 VAT_EXCPTN_CERTIF Character(20) VARCHAR2(20) NOT NULL Specifies the VAT exception certificate number. This identifier serves as proof of customer's exemption from VAT.
55 COUNTRY_SHIP_TO Character(3) VARCHAR2(3) NOT NULL Specifies the country to which the invoice contents were shipped (for VAT processing only).
56 COUNTRY_SHIP_FROM Character(3) VARCHAR2(3) NOT NULL Specifies the country from which the invoice contents were shipped (for VAT processing only).
57 COUNTRY_VAT_BILLTO Character(3) VARCHAR2(3) NOT NULL Specifies the country where an invoice is sent (for VAT processing only).
58 COUNTRY_VAT_BILLFR Character(3) VARCHAR2(3) NOT NULL Specifies the country where an invoice is generated (for VAT processing only).
59 COUNTRY_VAT_PERFRM Character(3) VARCHAR2(3) NOT NULL Country Where Service Physically Performed
60 COUNTRY_LOC_BUYER Character(3) VARCHAR2(3) NOT NULL Buyer's Location Country - May be either the VAT Entity or the Trading Partner
61 COUNTRY_LOC_SELLER Character(3) VARCHAR2(3) NOT NULL Seller's Location Country - May be either the VAT Entity or the Trading Partner
62 COUNTRY_VAT_SUPPLY Character(3) VARCHAR2(3) NOT NULL VAT Place of Supply Country
63 STATE_LOC_BUYER Character(6) VARCHAR2(6) NOT NULL Buyer's Location State - May be either the VAT Entity or the Trading Partner
64 STATE_LOC_SELLER Character(6) VARCHAR2(6) NOT NULL Seller's Location State - May be either the VAT Entity or the Trading Partner
65 STATE_SHIP_FROM Character(6) VARCHAR2(6) NOT NULL Ship From State
66 STATE_SHIP_TO Character(6) VARCHAR2(6) NOT NULL Ship To State
67 STATE_VAT_DEFAULT Character(6) VARCHAR2(6) NOT NULL VAT Defaulting State
68 STATE_VAT_PERFRM Character(6) VARCHAR2(6) NOT NULL State Where Service Physically Performed
69 STATE_VAT_SUPPLY Character(6) VARCHAR2(6) NOT NULL VAT Place of Supply State
70 VAT_RGSTRN_SELLER Character(20) VARCHAR2(20) NOT NULL Seller's VAT Registration
71 VAT_CALC_TYPE Character(1) VARCHAR2(1) NOT NULL "A flag that indicates how VAT is stated and determines how the system performs the relevant VAT calculations. If ""Exclusive"", the VAT amount is stated separately from the merchandise amount. If ""Inclusive"", the VAT is not stated separately but is included with the merchandise amount."
E=Exclusive
I=Inclusive
72 VAT_ROUND_RULE Character(1) VARCHAR2(1) NOT NULL " Rounding rule to be applied to VAT calculations. Options are 'Natural'
D=Round Down
N=Natural Round
U=Round Up
73 CATEGORY_ID Character(5) VARCHAR2(5) NOT NULL Category ID
74 SHIP_TYPE_ID Character(10) VARCHAR2(10) NOT NULL Ship Via Code
75 MFG_ID Character(50) VARCHAR2(50) NOT NULL Manufacturer ID
76 MFG_ITM_ID Character(50) VARCHAR2(50) NOT NULL Manufacturer's Item ID
77 UPN_TYPE_CD Character(4) VARCHAR2(4) NOT NULL Universal Product Number Format Type
78 UPN_ID Character(20) VARCHAR2(20) NOT NULL Universal Product Number