ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 工单领料,退料,入库,退库之SQL

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

原创 Linux操作系统 作者:jarli 时间:2019-03-13 11:12:04 0 删除 编辑
工单领料,退料,入库,退库信息
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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2003-03-27

  • 博文量
    227
  • 访问量
    162825