查詢某組織下子庫存與物料資訊

2022-08-30 08:48:12 字數 1988 閱讀 1918

--某組織下的某子庫存所有的物料資訊

select 

msib.segment1

,msi.secondary_inventory_name

,msi.organization_id

,msib.description

from

mtl_secondary_inventories msi

,mtl_system_items_b msib

,mtl_item_sub_inventories misi

where  1=1

and msi.organization_id=msib.organization_id

and msi.organization_id=misi.organization_id

and msib.inventory_item_id=misi.inventory_item_id

and misi.secondary_inventory =msi.secondary_inventory_name

and msi.secondary_inventory_name='stores'  --以名為store的子庫存為例

and msi.organization_id='207'   --以207組織為例

--某組織下子庫存物料所在的貨位

select 

msib.segment1

,(mil.segment1||'.'||mil.segment2||'.'||mil.segment3) locator

,mmst.status_code

from   mtl_secondary_locators msl

,mtl_item_locations mil

,mtl_system_items_b msib

,mtl_material_statuses_tl mmst

where 1=1

and msl.organization_id='207'   --以207組織為例

and mil.inventory_location_id=msl.secondary_locator

and msib.organization_id=msl.organization_id

and msib.inventory_item_id=msl.inventory_item_id

and mmst.status_id=mil.status_id

and mmst.language=userenv('lang')

---某組織下的某子庫存所有貨位資訊

select

(mil.segment1||'.'||mil.segment2||'.'||mil.segment3) locator

,mil.description

,mmst.status_code

,mil.subinventory_code

,mil.inventory_location_type

from

mtl_material_statuses_tl mmst

,mtl_item_locations mil

where 1=1

and mmst.status_id=mil.status_id

and mil.organization_id=207           --以207組織為例

and mil.subinventory_code='stores'  --以名為store的子庫存為例

and mmst.language=userenv('lang')

OU 庫存組織與子庫存

這三者應該是ebs中經常會造成混亂的吧,可以通過一句sql來理清其之間的關係 select hou.organization id ou org id,hou.name ou name,ood.organization id org org id,ood.organization code org ...

EBS OU 庫存組織與子庫存

可以通過以下的 sql區別三者的不同 selecthou.organization id ou org id,org id hou.nameou name,ou 名稱 ood.organization id org org id,庫存組織 id ood.organization code org o...

EBS OU 庫存組織與子庫存

可以通過以下的 sql區別三者的不同 selecthou.organization id ou org id,org id hou.nameou name,ou 名稱ood.organization id org org id,庫存組織 id ood.organization code org or...