ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 外租仓数据批量维护

外租仓数据批量维护

原创 Linux操作系统 作者:dkyo 时间:2007-11-29 00:00:00 0 删除 编辑

直接在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
)


w

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

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

注册时间:2008-01-03

  • 博文量
    109
  • 访问量
    207079