select
msi.segment1 物料编码,
msi.DESCRIPTION 物料描述,
msi.CREATION_DATE 建立时间,
msi.INVENTORY_ITEM_STATUS_CODE 物料状态,
DECODE(MSI.MRP_PLANNING_CODE, '3', 'MRP', '4', 'MPS', '6', '未计划') 计划方法,
MSI.PLANNER_CODE 计划员,
--DECODE(MSI.ITEM_TYPE, 'FG', '成品', 'SA', '子装配件','P','采购件','MP','自制又采购') 类型,
DECODE(MSI.PLANNING_MAKE_BUY_CODE, '1', '制造', '2', '购买') 制造购买,
PER.LAST_NAME 采购员,
MSI.POSTPROCESSING_LEAD_TIME 检验周期,
MSI.FIXED_ORDER_QUANTITY 固定订单数量,
MSI.MINIMUM_ORDER_QUANTITY 最小订单数量,
MSI.FIXED_DAYS_SUPPLY 固定天数供应,
FLV.MEANING 供应类型,
MSI.WIP_SUPPLY_SUBINVENTORY 供应子库,
MSI.FIXED_LOT_MULTIPLIER 固定批量倍数,
msi.primary_unit_of_measure 主计量单位,
msi.purchasing_item_flag 是否采购
from inv.MTL_SYSTEM_ITEMS_b msi,
APPS.PER_PEOPLE_F PER,
APPS.FND_LOOKUP_VALUES FLV
WHERE msi.organization_id = 851
AND MSI.BUYER_ID = PER.PERSON_ID(+) AND FLV.LANGUAGE = 'ZHS' AND
FLV.LOOKUP_TYPE(+) = 'WIP_SUPPLY' AND
FLV.LOOKUP_CODE(+) = MSI.WIP_SUPPLY_TYPE
AND MSI.ITEM_TYPE = 'P'
AND PER.LAST_NAME IS NULL
AND MSI.PLANNER_CODE IS NULL