工单领料,退料,入库,退库之SQL

工单领料,退料,入库,退库信息
SELECT WE.WIP_ENTITY_NAME,
ITEMA.SEGMENT1 AS "Assembly",
ITEMB.SEGMENT1 AS "item",
MTLTYPE.TRANSACTION_TYPE_NAME,
TRANMTL.TRANSACTION_QUANTITY,
TO_CHAR(TRANMTL.TRANSACTION_DATE,'yyyy/mm/dd') TRANSACTION_DATE,
TRANMTL.TRANSACTION_UOM,
TRANMTL.SUBINVENTORY_CODE
FROM MTL_MATERIAL_TRANSACTIONS TRANMTL,
WIP_ENTITIES WE,
WIP_DISCRETE_JOBS WDJ,
MTL_SYSTEM_ITEMS_B ITEMA,
MTL_SYSTEM_ITEMS_B ITEMB,
MTL_TRANSACTION_TYPES MTLTYPE
WHERE TRANMTL.ORGANIZATION_ID=WE.ORGANIZATION_ID
AND TRANMTL.TRANSACTION_SOURCE_ID=WE.WIP_ENTITY_ID
AND TRANMTL.ORGANIZATION_ID=ITEMB.ORGANIZATION_ID
AND WE.ORGANIZATION_ID=ITEMA.ORGANIZATION_ID
AND WDJ.PRIMARY_ITEM_ID=ITEMA.INVENTORY_ITEM_ID
AND ITEMB.INVENTORY_ITEM_ID=TRANMTL.INVENTORY_ITEM_ID
AND TRANMTL.TRANSACTION_TYPE_ID=MTLTYPE.TRANSACTION_TYPE_ID
AND WE.WIP_ENTITY_ID=WDJ.WIP_ENTITY_ID
AND TRANMTL.TRANSACTION_SOURCE_TYPE_ID IN (4,5)
AND TRANMTL.ORGANIZATION_ID=9
AND WE.WIP_ENTITY_NAME='WFY1-353045'

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/41594/viewspace-50512/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/41594/viewspace-50512/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值