CM_OHSNC_INQ_VW(SQL View) |
Index Back |
---|---|
On hand value (std non-config)Created on 09/02/99 RML CM800-9.0 View to show on hand value by business unit, item, and book. This view depends on CM_OH_INQ_VW1 for on hand quantity. (for NON-CONFIG standard cost items only) 10/01 dmw change build seq nbr from 1 to 3 |
SELECT a.oprid , a.business_unit , a.inv_item_id , a.cm_book , c.cm_method , d.cm_onhand_qty , %Round(SUM(%DecMult(a.cm_onhand_qty,(b.tl_cost + b.ll_cost))),6) FROM PS_CM_OH_INQ_TMP1 a , PS_CM_PRODCOST b , PS_CM_ITEM_METH_VW c , PS_CM_OH_INQ_VW1 d , PS_CM_ELEMENT e , PS_SET_CNTRL_REC f WHERE a.business_unit = b.business_unit AND a.inv_item_id = b.inv_item_id AND b.effdt = ( SELECT MAX(s.effdt) FROM PS_CM_PRODCOST s WHERE s.business_unit = a.business_unit AND s.inv_item_id = a.inv_item_id AND s.config_code = ' ' AND s.effdt <= a.system_date) AND a.inv_item_id = b.inv_item_id AND a.business_unit = c.business_unit AND a.inv_item_id = c.inv_item_id AND a.cm_book = c.cm_book AND c.cm_method = '8' AND a.oprid = d.oprid AND a.business_unit = d.business_unit AND a.inv_item_id = d.inv_item_id AND a.cm_book = d.cm_book AND a.consigned_flag = 'N' AND b.business_unit = f.setcntrlvalue AND f.RECNAME = 'CM_ELEMENT' AND f.setid = e.setid AND e.cost_element = b.cost_element AND e.cost_category <> 'OUB' GROUP BY a.oprid, a.business_unit, a.inv_item_id, a.cm_book, c.cm_method, d.cm_onhand_qty |
# | 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 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
3 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
4 | CM_BOOK | Character(10) | VARCHAR2(10) NOT NULL | Cost Book |
5 | CM_METHOD | Character(2) | VARCHAR2(2) NOT NULL |
8/20/02 lee: added xlate 9 for retroactive perp average
01/18/99 RML Created for CN800-9.0 FIFO/LIFO Enhancements
0=Non Cost 1=Actual Cost 6=Perpetual Weighted Average 7=Periodic Weighted Average 8=Value at Current Standard 9=Retroactive Perpetual Average |
6 | CM_ONHAND_QTY | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | 08/30/99 RML Changed from "onhand" to "on hand" |
7 | CM_ONHAND_VALUE | Number(19,6) | DECIMAL(18,6) NOT NULL | 08/30/99 RML Changed from "onhand" to "on hand" |