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. idea,mybatis读取配置文件报错:Could not find resource configuration.xml

    在pom.xml中,把xml文件加入编译,成功解决问题. <build> <resources> <resource> <directory>src/m ...

  2. 螺旋打印2D数组

    //一破题付出血的代价 多思考!public static void offer(int [][]a){ ,right=a.length-,low=,high=a[].length-; while(l ...

  3. Mysql索引介绍及常见索引的区别

    关于MySQL索引的好处,如果正确合理设计并且使用索引的MySQL是一辆兰博基尼的话,那么没有设计和使用索引的MySQL就是一个人力三轮车.对于没有索引的表,单表查询可能几十万数据就是瓶颈,而通常大型 ...

  4. Nginx 安装 配置 使用

    Nginx 安装 配置 使用 基本的HTTP服务器特性 处理静态文件,索引文件以及自动索引:打开文件描述符缓存(缓存元数据和文件描述符,下一次可以直接从内存找到数据或者文件的位置): 使用缓存加速反向 ...

  5. 前端性能优化之-dns预解析

    预解析的实现: 1. 用meta信息来告知浏览器, 当前页面要做DNS预解析:<meta http-equiv="x-dns-prefetch-control" conten ...

  6. Java不走弯路教程(前言)

    本教程的程序基于Windows开发,所以你需要有一台安装Windows操作系统的电脑. 前言本教程将带你完成Java的初学和WEB框架的开发,学完本教程,你将完成对Java的入门并且对下一步不再迷茫. ...

  7. Nginx 配置HTTPS 与Node.js 配置HTTPS方法

    前段时间公司网站要求加上HTTPS安全CA证书,公司服务器全是阿里云服务器,并且配有负载均衡,所以选择直接在阿里云购买CA证书,阿里云有一种证书可以免费试用一年,决定申请此证书,阿里云证书需要验证,阿 ...

  8. PHP echo和print 语句

    PHP  echo 和 print 语句 在 PHP 中有两个基本的输出方式: echo 和 print. 本章节中我们会详细讨论两个语句的用法,并在实例中演示如何使用 echo 和 print. P ...

  9. Android超精准计步器开发-Dylan计步

    转载请注明出处:http://blog.csdn.net/linglongxin24/article/details/52868803 本文出自[DylanAndroid的博客] Android超精准 ...

  10. MYSQL 更新时间自动同步与创建时间默认值共存问题

    本文作者:苏生米沿 本文地址:http://blog.csdn.net/sushengmiyan/article/details/50326259 在使用SQL的时候,希望在更新数据的时候自动填充更新 ...