0

0

mtl_supply表的作用

巴扎黑

巴扎黑

发布时间:2016-12-01 11:36:49

|

1959人浏览过

|

来源于php中文网

原创

mtl_supply表的作用,是当初培训时的一个知识点,现在我整理了一下,贴出来
1、当请购单创建、审批后,mtl_supply的变化
a.当创建完请购单,mtl_supply为空
b.当审批后,mtl_supply中产生一条数据,supply_type_code=req
c.当请购单审批后,请购头与请购行存入ms.req_header_id, ms.req_line_id,此时ms.supply_type_code=req

2、当po创建、审批后,mtl_supply的变化
a.当请购单转换成po后,在未审批时,mtl_supply为空
b.当审批后,mtl_supply中原有的supply_type_code=req被更改为supply_type_code=po
c.一般而言,当请购单自动创建为采购单时,其supply_type_code=req被更改为supply_type_code=po
d.当审批后的po做取消时,mtl_supply中supply_type_code=po被更改为supply_type_code=req
e.--当调用由请购单自动开采购单的程序时,如果未审批,ms.po_header_id ,ms.po_line_id,
--ms.po_release_id, ms.po_line_location_id ,ms.po_distribution_id,为空,如果已审批
--ms.req_header_id, ms.req_line_id被清空,ms.supply_type_code=po,对于在po单中修改数量或添加新的采购订单行
--而未审批,原有已审批的采购订单行数据不变,但新添加的行未录入该表
--当审批后的po做取消时,mtl_supply中supply_type_code=po被更改为supply_type_code=req,
--ms.req_header_id, ms.req_line_id被填入原有的请购单的头和行值,同时, ms.po_header_id,ms.po_line_id,
--ms.po_release_id, ms.po_line_location_id,ms.po_distribution_id, ms.need_by_date,ms.receipt_date,
--ms.expected_delivery_date,被清空
3、当po接收后,mtl_supply的变化
a.当po完全接收后,mtl_supply中原有的supply_type_code=po被更改为supply_type_code=receiving
b. --当采购单做完接收后,mtl_supply中supply_type_code=po被更改为supply_type_code=receiving,
--同时 ms.shipment_header_id,ms.shipment_line_id,ms.rcv_transaction_id ,存入shipment的头信息,行信息,及
--rcv_transaction的transaction_id
4、当po某行部分接收后,mtl_supply的变化
a.当po某行部分接收后,接受行中原有的supply_type_code=po被更改为supply_type_code=receiving
5、当po检验后,mtl_supply有什么变化
a.当po检验后,接受行中原有的supply_type_code=receiving不变
6、当po部分入库后,mtl_supply有什么变化;全部入库后呢
a.当po部分入库后,mtl_supply中该行记录被删除,而全部入库则该采购单所有行记录被删除
涉及的表

--已审批的请购单
select prh.requisition_header_id, prl.requisition_line_id,prh.segment1
from po_requisition_headers_all prh, po_requisition_lines_all prl
where prh.requisition_header_id = prl.requisition_header_id
and prh.requisition_header_id = 662
and prh.authorization_status= 'approved'

--已审批的采购单 
select ph.po_header_id,pl.po_line_id,ph.segment1,ph.*
from po_lines_all pl,po_headers_all ph
where pl.po_header_id=ph.po_header_id
/* and ph.po_header_id = 41526*/
and ph.authorization_status= 'approved'
and nvl(ph.cancel_flag,'n')'y'
and ph.creation_date>=trunc(sysdate)
--接收

select *
from rcv_shipment_headers rsh,
rcv_shipment_lines rsl
where rsh.shipment_header_id=rsl.shipment_header_id
and rsh.creation_date>=trunc(sysdate)
and rsh.receipt_num='185631'

select *
from rcv_transactions rt
wherert.transaction_id=870339
trm上的解释如下
mtl_supply stores incoming supply information for an organization.
this table forms one of the sources in inventory's demand-supply form.
there are four different types of supply captured in this table:

1) approved requisitions
2) approved purchase orders
3) shipments from suppliers
4) intransit shipments from another organization

types 3 and 4 could be distinguished by the presence of data in the
intransit_owning_organization_id column, which identifies the
ownership of the items in intransit. if this column is null then it
means that the shipment supply is from a vendor.
.
this information is used by the available to promise routine to derive
the atp information as appropiate. quantities of items in intransit
are also kept track of in the table.
.
records in mtl_supply are created every time you approve a requisition
or a po or create an intransit shipment. one record of req type will
be created for one requisition line when the requisition is approved.
one record of po type will be created per po distribution when a po is
approved and one record per shipment line will be created when a
shipment is created.
.
records in mtl_supply will be recreated whenever there are
transactions such as return to receiving, return to vendor or
cancellation of purchase orders.
.
records in mtl_supply are deleted every time you change the document
status to not approved. for example, a po would require approval if
you change the line and shipment quantity. 
if such a po is re-approved then the po supply will be recreated for
the new quantity.
.
the supply type code of a req supply record is changed to po every
time a requisition is autocreated. similarly the supply type code is
changed from po to receiving when a po is fully received. if a po is
partially received then a supply with the supply type code of
receiving will be created for the quantity received. when the receipt
is delivered the receiving supply is deleted. shipment supply works in
the same way as po supply.
.
there is a database trigger on mtl_supply with the name mtl_supply_t.
this trigger fires on insert, update or deletion of records in
mtl_supply. it inserts records into mrp_relief_interface table

相关专题

更多
php源码安装教程大全
php源码安装教程大全

本专题整合了php源码安装教程,阅读专题下面的文章了解更多详细内容。

65

2025.12.31

php网站源码教程大全
php网站源码教程大全

本专题整合了php网站源码相关教程,阅读专题下面的文章了解更多详细内容。

43

2025.12.31

视频文件格式
视频文件格式

本专题整合了视频文件格式相关内容,阅读专题下面的文章了解更多详细内容。

35

2025.12.31

不受国内限制的浏览器大全
不受国内限制的浏览器大全

想找真正自由、无限制的上网体验?本合集精选2025年最开放、隐私强、访问无阻的浏览器App,涵盖Tor、Brave、Via、X浏览器、Mullvad等高自由度工具。支持自定义搜索引擎、广告拦截、隐身模式及全球网站无障碍访问,部分更具备防追踪、去谷歌化、双内核切换等高级功能。无论日常浏览、隐私保护还是突破地域限制,总有一款适合你!

41

2025.12.31

出现404解决方法大全
出现404解决方法大全

本专题整合了404错误解决方法大全,阅读专题下面的文章了解更多详细内容。

204

2025.12.31

html5怎么播放视频
html5怎么播放视频

想让网页流畅播放视频?本合集详解HTML5视频播放核心方法!涵盖<video>标签基础用法、多格式兼容(MP4/WebM/OGV)、自定义播放控件、响应式适配及常见浏览器兼容问题解决方案。无需插件,纯前端实现高清视频嵌入,助你快速打造现代化网页视频体验。

9

2025.12.31

关闭win10系统自动更新教程大全
关闭win10系统自动更新教程大全

本专题整合了关闭win10系统自动更新教程大全,阅读专题下面的文章了解更多详细内容。

8

2025.12.31

阻止电脑自动安装软件教程
阻止电脑自动安装软件教程

本专题整合了阻止电脑自动安装软件教程,阅读专题下面的文章了解更多详细教程。

3

2025.12.31

html5怎么使用
html5怎么使用

想快速上手HTML5开发?本合集为你整理最实用的HTML5使用指南!涵盖HTML5基础语法、主流框架(如Bootstrap、Vue、React)集成方法,以及无需安装、直接在线编辑运行的平台推荐(如CodePen、JSFiddle)。无论你是新手还是进阶开发者,都能轻松掌握HTML5网页制作、响应式布局与交互功能开发,零配置开启高效前端编程之旅!

2

2025.12.31

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
php-src源码分析探索
php-src源码分析探索

共6课时 | 0.5万人学习

进程与SOCKET
进程与SOCKET

共6课时 | 0.3万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号