Oracle EBS 常用查询 - 库存组织

前端之家收集整理的这篇文章主要介绍了Oracle EBS 常用查询 - 库存组织前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
--查询Operation Unit
select * from hr_operating_units where name like '%OU_NAME%'


--查询指定Operation Unit下的所有库存组织Inventory Organization
SELECT * FROM org_organization_definitions WHERE OPERATING_UNIT = OU_ID

--查询Operation Unit与Inventory Org

SELECT HR_OPERATING_UNITS.ORGANIZATION_ID AS OU_ID,HR_OPERATING_UNITS.NAME AS OU_NAME,HR_OPERATING_UNITS.SHORT_CODE as OU_Short_Code,ORG_ORGANIZATION_DEFINITIONS.ORGANIZATION_ID AS INV_ORG_ID,ORG_ORGANIZATION_DEFINITIONS.ORGANIZATION_CODE AS INV_ORG_CODE,Org_Organization_Definitions.organization_name as Inv_Org_name
From Org_Organization_Definitions
INNER JOIN HR_OPERATING_UNITS ON HR_OPERATING_UNITS.ORGANIZATION_ID = ORG_ORGANIZATION_DEFINITIONS.OPERATING_UNIT
where hr_operating_units.Name like '%OU_NAME%'
order by HR_OPERATING_UNITS.name;

--查询指定库存组织下的物料清单
SELECT HR_OPERATING_UNITS.ORGANIZATION_ID AS OU_ID,ORG_ORGANIZATION_DEFINITIONS.ORGANIZATION_NAME AS INV_ORG_NAME,INVENTORY_ITEM_ID,MTL_SYSTEM_ITEMS_B.SEGMENT1 AS ITEM_NAME,MTL_SYSTEM_ITEMS_B.DESCRIPTION AS ITEM_DESCRIPTION,ENABLED_FLAG,MTL_SYSTEM_ITEMS_B.PURCHASING_ITEM_FLAG,MTL_SYSTEM_ITEMS_B.CUSTOMER_ORDER_FLAG,MTL_SYSTEM_ITEMS_B.INTERNAL_ORDER_FLAG,MTL_SYSTEM_ITEMS_B.SERVICE_ITEM_FLAG,MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_FLAG,MTL_SYSTEM_ITEMS_B.ENG_ITEM_FLAG,MTL_SYSTEM_ITEMS_B.PURCHASING_ENABLED_FLAG,MTL_SYSTEM_ITEMS_B.CUSTOMER_ORDER_ENABLED_FLAG,MTL_SYSTEM_ITEMS_B.INTERNAL_ORDER_ENABLED_FLAG,MTL_SYSTEM_ITEMS_B.SO_TRANSACTIONS_FLAG,MTL_SYSTEM_ITEMS_B.MTL_TRANSACTIONS_ENABLED_FLAG,MTL_SYSTEM_ITEMS_B.STOCK_ENABLED_FLAG,MTL_SYSTEM_ITEMS_B.BOM_ENABLED_FLAG,MTL_SYSTEM_ITEMS_B.BUILD_IN_WIP_FLAG
FROM MTL_SYSTEM_ITEMS_B
inner join Org_Organization_Definitions on Org_Organization_Definitions.ORGANIZATION_ID = MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID
INNER JOIN HR_OPERATING_UNITS ON HR_OPERATING_UNITS.ORGANIZATION_ID = ORG_ORGANIZATION_DEFINITIONS.OPERATING_UNIT
WHERE hr_operating_units.Name like '%OU_NAME%' AND ORG_ORGANIZATION_DEFINITIONS.ORGANIZATION_CODE like '%INV_ORG_CODE%'
原文链接:https://www.f2er.com/oracle/213291.html

猜你在找的Oracle相关文章