ITPub博客

首页 > 应用开发 > Java > MTL_MATERIAL_TRANSACTION表字段的解释及和各相关表的关联

MTL_MATERIAL_TRANSACTION表字段的解释及和各相关表的关联

Java 作者:你好dxy 时间:2022-09-05 16:04:31 0 删除 编辑

事务处理类型(transaction_type_id):
select transaction_type_id,
        transaction_type_name
from   mtl_transaction_types
order  by 1;


事务处理活动(transaction_action_id)
============================
select lookup_code,meaning
from   mfg_lookups
where  lookup_type ='MTL_TRANSACTION_ACTION'
order  by 1;
LOOKUP_CODE MEANING


事务处理来源(transaction_source_type_id)
select lookup_code,meaning
from   mfg_lookups
where  lookup_type ='MTL_DISPOSITION'
order  by 1;


RCV_TRANSACTIONS_INTERFACE 中的
事务处理类型(TRANSACTION_TYPE)

select lookup_code,DESCRIPTION Meaning
from   po_lookup_codes
where  lookup_type = 'RCV TRANSACTION TYPE'
order  by 1;
LOOKUP_CODE                    MEANING
============================== ========================================
ACCEPT                         Accept items following an inspection
CANCEL                         Advanced Shipment Notice Transaction to
                                Cancel ASN
CORRECT                        Correct a previous transaction entry
DELIVER                        Deliver a shipment of items to the reque
                                stor
MATCH                          Match unordered items to a purchase orde
                                r
RECEIVE                        Receive a shipment of items
REJECT                         Reject items following an inspection
RETURN TO CUSTOMER             Return items to Customer
RETURN TO RECEIVING            Return delivered items to receiving
RETURN TO VENDOR               Return Items to the supplier
SHIP                           Intransit shipment or internal order
TRANSFER                       Transfer items between receiving locatio
                                ns
UNORDERED                      Receive items without matching to a sour
                                ce document


库存事务处理接口表(MTL_TRANSACTIONS_INTERFACE)的说明:
要想物料事务处理管理器能处理库存接口中的数据,则必须保证如下标志的信息:
    PROCESS_FLAG      = 'Y'
    LOCK_FLAG         = 'N' or NULL
    TRANSACTION_MODE  = 3
    ERROR_CODE        = NULL
    ERROR_EXPLANATION = NULL
并且当接口中的数据发生错误,也必须把这些标志修改为如上的状态,
数据才会被处理
同理MTL_MATERIAL_TRANSACTIONS_TEMP也是如此


来源类型为帐户别名
mmt的transaction_source_id 关联mtl_generic_dispositions 里的字段 disposition_id 


来源类型为任务或计划
mmt的transaction_source_id 关联wip_entities 中字段wip_entity_id


来源类型为采购订单
mmt的transaction_source_id 关联po_headers_all 中的字段po_header_id  



来源类型为销售订单
mmt的transaction_source_id 关联mtl_sales_orders 中的字段sales_order_id


来源类型为内部申请
mmt的transaction_source_id 关联PO_REQUISITION_HEADERS_ALL 中的字段requisition_header_id


来源类型为物料搬运单
mmt的transaction_source_id  就是界面上面显示的 来源



来源类型为帐户
mmt的transaction_source_id 关联gl_code_combinations中的字段code_combination_id


a)TRANSACTION_SOURCE_ID: Job  or  Schedule WIP_ENTITIES.WIP_ENTITY_ID

TRANSACTION_SOURCE_TYPE_ID =  5

 

b) TRANSACTION_SOURCE_ID: Sales  Order  MTL_SALES_ORDERS.SALES_ORDER_ID

TRANSACTION_SOURCE_TYPE_ID =  2  ,  8  ,  12  ,  13

 

c) TRANSACTION_SOURCE_ID:  Account  Alias  MTL_GENERIC_DISPOSITIONS.DISPOSITION_ID

TRANSACTION_SOURCE_TYPE_ID =  6

 

d) TRANSACTION_SOURCE_ID: Purchase  Order  PO_HEADERS_ALL.PO_HEADER_ID

TRANSACTION_SOURCE_TYPE_ID =  1

 

e) TRANSACTION_SOURCE_ID:  Account  GL_CODE_COMBINATIONS.CODE_COMBINATION_ID

TRANSACTION_SOURCE_TYPE_ID =  all  others

 

A useful  select  to  find  the  specific  source  number  and  link  it  to  TRANSACTION_SOURCE_ID  is  :

SELECT  mmtt.transaction_source_id

      ,(  CASE

          WHEN  mmtt.transaction_source_type_id =  1  THEN

          (  SELECT  'RSH_NUMBER: '  || rcv.shipment_num

            FROM     rcv_shipment_headers rcv

                 ,rcv_transactions     rcvt

            WHERE    rcv.shipment_header_id = rcvt.shipment_header_id

            AND      rcvt.transaction_id = mmtt.transaction_source_id)

          WHEN  mmtt.transaction_source_type_id =  2  THEN

          (  SELECT  'SO_NUMBER: '  || segment1  FROM  mtl_sales_orders  WHERE  sales_order_id = mmtt.transaction_source_id)

          WHEN  mmtt.transaction_source_type_id =  4  THEN

          (  SELECT  'MO_NUMBER: '  || request_number

            FROM     mtl_txn_request_headers

            WHERE    request_number = to_char(mmtt.transaction_source_id))

          WHEN  mmtt.transaction_source_type_id =  5  THEN

          (  SELECT  'WIP_NUMBER: '  || wip_entity_name  FROM  wip_entities  WHERE  wip_entity_id = mmtt.transaction_source_id)

          WHEN  mmtt.transaction_source_type_id =  7  THEN

          (  SELECT  'INT_REQ_NUMBER: '  || rcv.shipment_num

            FROM     rcv_shipment_headers rcv

                 ,rcv_transactions     rcvt

            WHERE    rcv.shipment_header_id = rcvt.shipment_header_id

            AND      rcvt.transaction_id = mmtt.transaction_source_id)

          WHEN  mmtt.transaction_source_type_id =  8  THEN

          (  SELECT  'INT_SO_NUMBER: '  || segment1  FROM  mtl_sales_orders  WHERE  sales_order_id = mmtt.transaction_source_id)

          WHEN  mmtt.transaction_source_type_id =  10  THEN

          (  SELECT  'PHY_NAME: '  || physical_inventory_name

            FROM     mtl_physical_inventories

            WHERE    physical_inventory_id = mmtt.transaction_source_id)

          WHEN  mmtt.transaction_source_type_id =  13  THEN

          (  SELECT  'WIP_NUMBER: '  || wip_entity_name  FROM  wip_entities  WHERE  wip_entity_id = mmtt.transaction_source_id)

          ELSE

           'NULL'

        END  ) src_number

FROM     mtl_material_transactions_temp mmtt




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


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

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

注册时间:2022-09-05

  • 博文量
    3
  • 访问量
    5468