工单领料,退料,入库,退库信息
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'
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/