OM_PWC_PDUOM_VW

(SQL View)
Index Back

Product defautl UOM

Product defautl UOM for Average Price & Margin Analysis

SELECT P.SETID , P.PRODUCT_ID , P.INV_ITEM_ID , U.UNIT_OF_MEASURE , CR.CONVERSION_RATE FROM PS_PROD_ITEM P , PS_PROD_UOM U , PS_INV_ORDR_UOM_VW CR WHERE P.SETID = U.SETID AND P.PRODUCT_ID = U.PRODUCT_ID AND P.SETID = CR.SETID AND P.INV_ITEM_ID = CR.INV_ITEM_ID AND U.UNIT_OF_MEASURE = CR.UNIT_OF_MEASURE AND P.INV_ITEM_ID != ' ' AND P.EFF_STATUS = 'A' AND U.DFLT_UOM = 'Y' AND EXISTS ( SELECT 'X' FROM PS_PROD_UOM U2 WHERE P.SETID = U2.SETID AND P.PRODUCT_ID = U2.PRODUCT_ID AND U2.DFLT_UOM = 'Y' ) UNION SELECT P.SETID , P.PRODUCT_ID , P.INV_ITEM_ID , I.UNIT_MEASURE_STD , 1.00000000 FROM PS_PROD_ITEM P , PS_PROD_ITEMMST_VW I WHERE P.SETID = I.SETID AND P.INV_ITEM_ID = I.INV_ITEM_ID AND P.EFF_STATUS = 'A' AND P.INV_ITEM_ID != ' ' AND NOT EXISTS ( SELECT 'X' FROM PS_PROD_UOM U3 WHERE P.SETID = U3.SETID AND P.PRODUCT_ID = U3.PRODUCT_ID AND U3.DFLT_UOM = 'Y' ) UNION SELECT SETID , PRODUCT_ID , ' ' , UNIT_OF_MEASURE , 1.00000000 FROM PS_PROD_UOM T WHERE DFLT_UOM = 'Y' AND EXISTS ( SELECT 'X' FROM PS_PROD_ITEM P3 WHERE P3.SETID = T.SETID AND P3.PRODUCT_ID = T.PRODUCT_ID AND P3.INV_ITEM_ID = ' ')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 PRODUCT_ID Character(18) VARCHAR2(18) NOT NULL Product ID
3 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
4 UNIT_MEASURE_STD Character(3) VARCHAR2(3) NOT NULL Standard Unit of Measure
5 CONVERSION_RATE Signed Number(17,8) DECIMAL(15,8) NOT NULL Conversion Rate