直接在API导入界面直接导入,下为查询的脚本,只需把该数据粘贴在导入界面:
select vendor_code,
'******库存组织',
SUBINVENTORY_CODE,
decode(sign(transaction_quantity),-1,'k.外租仓入库',1,'k.外租仓出库'),
segment1,
primary_uom_code,
ABS(transaction_quantity),
sysdate
from
(
select substr(clt.segment1,4,12) vendor_code,
'****库存组织',
cio.SUBINVENTORY_CODE,
cit.segment1,
cit.primary_uom_code,
sum(cio.transaction_quantity) transaction_quantity,
sysdate
from apps.mtl_onhand_quantities cio,
apps.mtl_system_items cit,
apps.mtl_item_locations clt
where cit.inventory_item_id = cio.inventory_item_id
and cit.organization_id = cio.organization_id
and cio.locator_id = clt.inventory_location_id(+)
and cio.organization_id = clt.organization_id(+)
and cio.subinventory_code = clt.subinventory_code(+)
and cio.ORGANIZATION_ID=***
and cio.SUBINVENTORY_CODE in('W111物待','W112物租')
group by substr(clt.segment1,4,12),
'****库存组织',
cio.SUBINVENTORY_CODE,
cit.segment1,
cit.primary_uom_code,
sysdate
having sum(cio.transaction_quantity) <>0
)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/302844/viewspace-85982/ ,如需转载,请注明出处,否则将追究法律责任。