博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

查询物料编码及对应的业务类型

Posted on 2011-12-13 18:18  奥客  阅读(567)  评论(0编辑  收藏  举报


--不能入库的物料
1 6N137-500E  6000  PO 20332 / 1.1
  
select mc.INVENTORY_ITEM_ID,ms.segment1,mc.SEGMENT1,mc.SEGMENT2 ,scv.DEPARTMENT
            from MTL_ITEM_CATEGORIES_V mc ,
              mtl_system_items_b  ms,
              ( --关联有效的厂牌、产品线与之对应的业务类型
              select scv.ITEM_CATEGORY_SEGMENT1,scv.ITEM_CATEGORY_SEGMENT2,scv.DEPARTMENT
              from  SECOM_COMPARISON_V scv where status_Code='VALID'
              )scv
            where mc.INVENTORY_ITEM_ID=ms.inventory_item_id(+)
              and mc.ORGANIZATION_ID=ms.organization_id(+)
              and mc.SEGMENT1=scv.ITEM_CATEGORY_SEGMENT1(+)
              and mc.SEGMENT2=scv.ITEM_CATEGORY_SEGMENT2(+)
              and  ms.organization_id=84
              and mc.CATEGORY_SET_ID=1
              and scv.DEPARTMENT is not null --业务类型实际不会为空
             
              and ms.segment1='6N137-500E'


14085  

--修改状态
processing_status_code: PENDING <=PENDING
processing_mode_code: BATCH     <=PIMMEDIATE
transaction_status_code: PENDING <=PPENDING

--查询原状态值
select ti.processing_status_code, ti.processing_mode_code,ti.transaction_status_code  
from RCV_TRANSACTIONS_INTERFACE ti
where ti.interface_transaction_id=795983

--修改
update  RCV_TRANSACTIONS_INTERFACE ti  set ti.processing_mode_code='BATCH'
where ti.interface_transaction_id=795983


2、运行请求:PO超级用户/.....提前新请求/接收事务处理处理器
3、做接收入库(接收事务处理)


commit