物料调拨在途/在制品过程的价值如何取值?

[复制链接]
查看11 | 回复3 | 2007-10-20 08:38:44 | 显示全部楼层 |阅读模式
物料现有量的成本价值可以直接取到,物料调拨在途/在制品过程的价值如何取值?
提交系统报表 :所有库存值报表可以追溯到其中的 库存/接受/在途价值
问下:在途/在制 物料的价值在哪些表取值是准确的?
熟悉这方面的朋友请给出相关表或者查询条件或者语句,谢谢.
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
打开报表 所有库存值报表 相关SQL.
但是cst_inv_qty_temp CIQT, cst_inv_cost_temp CICT,两个临时表我在触发器和程序单元并未发现相关信息.
SELECT &P_ITEM_SEG ITEM_NUMBER,
&P_CAT_SEG CATEGORY,
MSI.description DESCRIPTION,
MSI.primary_uom_code UOM_CODE,
ROUND(SUM(CIQT.rollback_qty),:P_Qty_Precision) STK_QTY,
0 INT_QTY,
0 RCV_QTY,
ROUND(
SUM(CIQT.rollback_qty) *
DECODE(SUB.asset_inventory,1,CICT.item_cost,0) *
:P_Exchange_Rate/
:Round_Unit
) *
:Round_Unit STK_VALUE,
0 INT_VALUE,
0 RCV_VALUE
FROM cst_inv_qty_temp CIQT,
cst_inv_cost_temp CICT,
mtl_parameters MP,
mtl_system_items_vl MSI,
mtl_categories MC,
mtl_secondary_inventories SUB
WHERECIQT.qty_source in (3,4)
ANDCICT.cost_source = 1
ANDCICT.organization_id = CIQT.organization_id
ANDCICT.inventory_item_id = CIQT.inventory_item_id
AND( MP.primary_cost_method = 1
ORCICT.cost_group_id = CIQT.cost_group_id) -- should we split?
ANDMP.organization_id = CIQT.organization_id
ANDSUB.organization_id = CIQT.organization_id
ANDSUB.secondary_inventory_name = CIQT.subinventory_code
ANDMSI.organization_id = CIQT.organization_id
ANDMSI.inventory_item_id = CIQT.inventory_item_id
ANDMC.category_id= CIQT.category_id
GROUP
BY &P_ITEM_SEG,
&P_CAT_SEG,
MSI.description,
MSI.primary_uom_code,
DECODE(SUB.asset_inventory,1,CICT.item_cost,0)
UNION ALL
SELECT &P_ITEM_SEG ITEM_NUMBER,
&P_CAT_SEG CATEGORY,
MSI.description DESCRIPTION,
MSI.primary_uom_code UOM_CODE,
0 STK_QTY,
ROUND(SUM(CIQT.rollback_qty),:P_Qty_Precision) INT_QTY,
0 RCV_QTY,
0 STK_VALUE,
ROUND(
SUM(CIQT.rollback_qty) *
CICT.item_cost *
:P_Exchange_Rate/
:Round_Unit
) *
:Round_Unit INT_VALUE,
0 RCV_VALUE
FROM cst_inv_qty_temp CIQT,
cst_inv_cost_temp CICT,
mtl_parameters MP,
mtl_system_items_vl MSI,
mtl_categories MC
WHERECIQT.qty_source in (6,7)
ANDCICT.organization_id = :P_ORG_ID
ANDCICT.cost_source = 1
ANDCICT.organization_id = CIQT.organization_id
ANDCICT.inventory_item_id = CIQT.inventory_item_id
AND( MP.primary_cost_method = 1
ORCICT.cost_group_id = CIQT.cost_group_id) -- should we split?
ANDMP.organization_id = CIQT.organization_id
ANDMSI.organization_id = CIQT.organization_id
ANDMSI.inventory_item_id = CIQT.inventory_item_id
ANDMC.category_id= CIQT.category_id
GROUP
BY &P_ITEM_SEG,
&P_CAT_SEG,
MSI.description,
MSI.primary_uom_code,
CICT.item_cost
UNION ALL
SELECT &P_ITEM_SEG ITEM_NUMBER,
&P_CAT_SEG CATEGORY,
MSI.description DESCRIPTION,
MSI.primary_uom_code UOM_CODE,
0 STK_QTY,
0 INT_QTY,
ROUND(SUM(CIQT.rollback_qty),:P_Qty_Precision) RCV_QTY,
0 STK_VALUE,
0 INT_VALUE,
ROUND(
SUM(CIQT.rollback_qty)*
CICT.item_cost *
:P_Exchange_Rate /
:Round_Unit
) *
:Round_Unit RCV_VALUE
FROMcst_inv_qty_temp CIQT,
cst_inv_cost_temp CICT,
mtl_system_items_vl MSI,
mtl_categories MC
WHERE CIQT.qty_source = 9
AND CICT.cost_source = 3
AND CICT.organization_id = CIQT.organization_id
AND CICT.inventory_item_id = CIQT.inventory_item_id
AND CICT.rcv_transaction_id = CIQT.rcv_transaction_id
AND MSI.organization_id = CIQT.organization_id
AND MSI.inventory_item_id = CIQT.inventory_item_id
AND MC.category_id= CIQT.category_id
GROUP
BY &P_ITEM_SEG,
&P_CAT_SEG,
MSI.description,
MSI.primary_uom_code,
CICT.item_cost
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
我也想知道,cst_inv_qty_temp 的值是怎么进去的?条件是什么?
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
楼主这个怎么解决的。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行