MTL_TRANSACTIONS_INTERFACE

MTL_TRANSACTIONS_INTERFACE is the interface point between

non– Inventory applications and the Inventory transaction module.

Transaction Manager concurrent program polls this table at a

user–specified process interval, and submits the Transaction Workers to

process them. Processing consists of data derivation, validation, and

transfer of records from MTL_TRANSACTIONS_INTERFACE,

MTL_TRANSACTION_LOTS_INTERFACE, and

MTL_SERIAL_NUMBERS_INTERFACE into their respective TEMP

tables, from where they are processed by the transaction processor.

MTL_TRANSACTIONS_INTERFACE follows the Inventory standard

for interfacing flexfields. Any parameters which are represented by

flexfields may be entered in the interface table either as code

combination identifiers or as flexfield segment combinations. The

Transaction Worker will validate that any given identifiers are valid

and enabled. If no identifier is given, then the Transaction Worker will

validate and decode the flexfield segment values, and where

appropriate, create new flexfield combinations in the database.

The Transaction Manager picks up the rows to process based on the

LOCK_FLAG, TRANSACTION_MODE, PROCESS_FLAG to

manipulate the records in the table. Only records with

TRANSACTION_MODE of 3, LOCK_FLAG of ’2’, and

PROCESS_FLAG of ’1’ will be picked up by the Transaction Manager

and assigned to a Transaction Worker. If a record fails to process

completely, then PROCESS_FLAG will be set to ’3’ and ERROR_CODE

1、Interface是连接非库存系统与库存系统的桥梁

2、Interface的数据经常事务管理并发处理后,将插入对应的临时表,再由事务处理器处理。

3、数据处量条件限制请见左边

MTL_MATERIAL_TRANSACTIONS_TEMP

MTL_MATERIAL_TRANSACTIONS_TEMP is the gateway for all

material transactions.

Records are processed from this table into Inventory through the

transaction processor. All Inventory transaction forms write directly to

this table. Outside applications must write transaction records to

MTL_TRANSACTIONS_INTERFACE to be processed through

MTL_MATERIAL_TRANSACTIONS_TEMP and the transaction

processor by the Transaction Worker concurrent program.

Lots and serial numbers for a

MTL_MATERIAL_TRANSACTIONS_TEMP(MMTT) record are stored

in the tables MTL_TRANSACTION_LOTS_TEMP(MTLT) and

MTL_SERIAL_NUMBERS_TEMP(MSNT). If the item is under lot

control, then MMTT.TRANSACTION_TEMP_ID joins to

MTLT.TRANSACTION_TEMP_ID. If the item is also under serial

number control, then MTLT.SERIAL_TRANSACTION_TEMP_ID joins

to MSNT.TRANSACTION_TEMP_ID. If the item is only under serial

number control, then MMTT.TRANSACTION_TEMP_ID joins to

MSNT.TRANSACTION_TEMP_ID.

Transfer transactions are stored in this table as a single record. The

transaction processor creates two transactions from the single record.

看看左边的红色标识的话:所有事务处理的必经的步骤。

所有插入事务处理正式表的数据,都必须经过TEMP表后,(自动)运行Transaction Processor后插入正式表。

从Oracle官方给出的解释,我们可以基本上得到如下一个逻辑图:

如果照上图描述,那么,我们能否通过一些实例来来说明或者说证明我们的想法呢?

一、先了解它

首先,我们明确一下这两个表:

临时表: MTL_MATERIAL_TRANSACTIONS_TEMP (以下简称TEMP表)

接口表: MTL_TRANSACTIONS_INTERFACE      (以下简称INTERFACE表)

1)   Interface

·直接插入数据入接口表。这里面有几个需要注意的地方:

字段

描述

Source_code, Source_header_id, Source_line_id

来源行,供追溯使用,可以随便填

transaction_source_name

事务处理来源名称,可以随便指定。

PROCESS_FLAG

transaction is ready to be processed by the Transaction

Manager or Worker (’1’ for ready, ’2’ for not ready); if

the transaction fails for some reason, the Transaction Worker sets the value of PROCESS_FLAG to ’3’

TRANSACTION_MODE

the transaction is to be processed in immediate

concurrent processing mode (2) or background processing mode(3)

LOCK_FLAG

Flag indicating whether the transaction is locked by the

Transaction Manager or Workers (’1’ for locked, ’2’ or NULL

for not locked); this prevents two different Workers from

processing the same transaction; You should always specify ’2’

TRANSACTION_TYPE_ID

Transaction type identifier,这里要注意一下的是,如果你是做做杂项处理,那么,如果事务处理数据小于0,那么应该指定为32(Miscellaneous issue),反之则为42(Miscellaneous receipt)

Organization_id

Inventory_item_id

subinventory_code

locator_id

revision

transfer_organization

transfer_subinventory

指定传送仓库及物品有关的信息,如果这些值有,请指定。

transaction_quantity

transaction_uom

transaction_cost

transaction_date

指定事务处理的数量、单位、成本等信息,成本的话,如果指定为NULL,系统会以事务处理器运行时的成本出(入)库。请慎重指定。

distribution_account_id

如果是杂项出入库,请指定库存成本帐户,如果是帐户别名出入库,则需指定。

WHO 字段

需要指定

插入数据完成后,那么,按我们的流程,需要进行TransactionProcessor,进行后续数据处理

简称:INCTCM

参数:无

提交语句Sample:

l_request_id    := fnd_request.submit_request('INV',

'INCTCM',

'',

to_char(sysdate,'YYYY/MM/DDHH24:MI:SS'),

false,

chr(0))

1)   TEMP

在INV的内部处理中,系统都会直接将Process插入至TEMP表,再通过自动请求TransactionProcessor,将数据导入至正式表中。

直接插数据入TEMP表一般存在于INV模块,不过,ORACLE官方并不太支持这种方式,“Load thetransaction records into MTL_TRANSACTIONS_INTERFACE table .Loading thetransaction records directly into MTL_MATERIAL_TRANSACTIONS_TEMP table is notsupported.”

那么,能不能这么做呢?

其实,Oracle这句话是正确的,人家是说“你可以直接插MTI,但你不能直接插数据入MMTT”。

因为这两者有区别的:MMTT表是联机处理用的,也就是说是form通过API往里面写数据并可以用API直接处理的,MTI表是接口表,里面的数据是通过Conc Req转到MMTT中并通过txn worker来处理的。

首先来说MMTT的API,我们随机打开了一个RORM-杂项事务处理FORM,它的主BLOCK就是基于MMTT的,在Trigger Pre-Insert中,写了很多前期处理的操作:如取Temp transactionid,如果系统启用了批次/序列,需要在LOT的BLOCK中先写入相关的信息。插表的操作即通过标准APIAPP_STANDARD.KEY_COMMIT来完成,将数据保存至MMTT中。

所以,我觉得(没实验过)我们完全可以模仿ORACLE标准FORM来往MMTT中插入数据,但是,这前期涉及的针对批次、序列的处理可能会相当烦锁,如果没有这些麻烦,往MMTT中插数据可能与MTI中插数据一样简单。

在这里我先将TEMP表几个关键字段列出来:

字段

描述

TRANSACTION_HEADER_ID

TRANSACTION_TEMP_ID

Header_id为主键,即MMTT的KEY,TEMP ID可有可无,即未来的Transaction ID

TRANSACTION_SOURCE_TYPE_ID

固定值,一般有如下值

1 Purchase order

2 Sales order

3 Account number

4 Job or schedule

5 Job or schedule

6 Account alias

SOURCE_CODE

SOURCE_LINE_ID

来源码和来源行ID

TRANSACTION_MODE

the transaction is to be processed in immediate

concurrent processing mode (2) or background processing mode(3)

LOCK_FLAG

Flag indicating whether the transaction is locked by the

Transaction Manager or Workers (’1’ for locked, ’2’ or NULL

for not locked); this prevents two different Workers from

processing the same transaction; You should always specify ’2’

TRANSACTION_TYPE_ID

Transaction type identifier,这里要注意一下的是,如果你是做做杂项处理,那么,如果事务处理数据小于0,那么应该指定为32(Miscellaneous issue),反之则为42(Miscellaneous receipt)

Organization_id

Inventory_item_id

subinventory_code

locator_id

revision

transfer_organization

transfer_subinventory

指定传送仓库及物品有关的信息,如果这些值有,请指定。

transaction_quantity

transaction_uom

transaction_cost

transaction_date

指定事务处理的数量、单位、成本等信息,成本的话,如果指定为NULL,系统会以事务处理器运行时的成本出(入)库。请慎重指定。

distribution_account_id

如果是杂项出入库,请指定库存成本帐户,如果是帐户别名出入库,则需指定。

WHO 字段

需要指定

物料事务处理interface与temp解析的更多相关文章

  1. 物料事务处理接口表 MTL_TRANSACTIONS_INTERFACE 账户别名使用 及 提示无效的分配账户字段

    实例: PROCEDURE MAIN(P_ORGANIZATION_ID NUMBER, P_PERIOD_NAME VARCHAR2, XV_STATUS OUT VARCHAR, XV_MESG ...

  2. INV 调试: 如何获取库存物料事务处理调试信息

     1. 按如下方式设置系统配置文件值: 系统配置文件值 地点/用户/应用/职责层配置文件值 --汇总 FND: 启用调试日志   是 FND:调试日志层级   陈述 INV: 调试跟踪: 是 IN ...

  3. 【EBS】取数SQL-平均成本更新的物料事务处理追溯到应付发票

    SELECT hou.name,--组织 aia.invoice_num,--发票编号 msib.segment1,--物料编码 mmt.transaction_id--物料事务处理 FROM mtl ...

  4. 【Golang 接口自动化04】 解析接口返回JSON串

    前言 上一次我们一起学习了如何解析接口返回的XML数据,这一次我们一起来学习JSON的解析方法. JSON(Javascript Object Notation)是一种轻量级的数据交换语言,以文字为基 ...

  5. XML解析之DOM详解及与SAX解析方法的比较

    XML解析(DOM) XML文件解析方法介绍 我们所用到的NSXMLParser是采用SAX方法解析 SAX(Simple API for XML) 只能读,不能修改,只能顺序访问,适合解析大型XML ...

  6. xml的生成与解析_老师笔记

    使用序列化器生成一个xml文件 //1,初始化一个xml文件的序列化器 XmlSerializer serializer = Xml.newSerializer(); //2.初始化序列器参数 Fil ...

  7. SpringMVC源码之参数解析绑定原理

    摘要 本文从源码层面简单讲解SpringMVC的参数绑定原理 SpringMVC参数绑定相关组件的初始化过程 在理解初始化之前,先来认识一个接口 HandlerMethodArgumentResolv ...

  8. 一个简单的定时表达式(HH:mm:ss)解析

    前言 为客户开发了一个日志监控程序,监听各频道是否正常工作.其中有一个功能是这样的,当所有频道正常运行一段时间后,语音提示值班人员系统运行正常.一开始,想法比较简单,设置了一个变量,在线程不断轮询的过 ...

  9. 详解EBS接口开发之库存事务处理采购接收和退货

    (一)接收&退货常用标准表简介 1.1   常用标准表 如下表中列出了与采购接收&退货导入相关的表和说明: 表名 说明 其他信息 RCV_TRANSACTIONS 采购接收事务表 事务 ...

随机推荐

  1. Java多线程volatile和synchronized总结

    volatile是轻量级的synchronized,在多处理器(多线程)开发中保证了共享变量的"可见性".可见性表示当一个线程修改了一个共享变量时,另外一个线程能读到这个修改的值. ...

  2. Linux允许、禁止ping包

    默认情况下Linux系统允许ping,但是在某些情况下为了安全起见,我们都把服务器设置为禁ping  临时允许ping命令可使用命令: echo 0 >/proc/sys/net/ipv4/ic ...

  3. Linux学习之CentOS(十一)-----Linux 账号管理(转)

    Linux 账号管理(转) useraddpasswdchageusermoduserdelfingerchfnchshidgroupaddgroupmodgroupdelgpasswd su(帐号切 ...

  4. Linux学习之CentOS(五)--CentOS下VMware-Tools安装

    已经进入到了Linux学习之CentOS的第六篇随笔了,所以这里就介绍一下VMware-Tools的安装. VMware-Tools的安装 VMware-Tools 主要的功能就是让用户在虚拟机和真实 ...

  5. Mysql锁机制--读锁

    Mysql 系列文章主页 =============== 1 准备数据 1.1 建表 1.1.1 建立 Employee表 DROP TABLE IF EXISTS employee; CREATE ...

  6. Flexible DEMO 实现手淘H5页面的终端适配

    <!DOCTYPE html> <html> <head> <title>淘宝flexiblejs</title> <meta cha ...

  7. 设置元素text-overflow: ellipsis后引起的文本对齐问题

    .ellipsis { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } 给元素设置了这个属性之后,该行内元素和旁边的 ...

  8. win8以上系统查看iis网站进程内存占用情况

    由于win8以上系统在任务管理器中已经屏蔽了具体的IIS网站的进程,在进程以及详细中无法区分是哪个站点了,所以我们需要先知道各站点对应的进程pid,然后再到任务管理器中根据具体的pid查看资源占用情况 ...

  9. nodeppt的使用教程

    为什么选择nodeppt 这可能是迄今为止最好的网页版演示库 基于GFM的markdown语法编写 支持html混排,再复杂的demo也可以做! 支持多个皮肤:colors-moon-blue-dar ...

  10. Oracle中的行转列例子详解

    --场景1: A B a a a b b 希望实现如下效果: a ,, b , create table tmp as B from dual union all B from dual union ...