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
0
0
相关文章
php嵌入式需要什么环境_搭建php+linux嵌入式开发环境【详解】
php中::能用于接口静态方法吗_接口静态方法调用规则【操作】
php会话怎么开启_session_start函数的作用与使用时机【方法】
如何解决同一段404代码在不同主机上表现不一致的问题
PHP 中如何在函数内持久修改引用变量所指向的目标
本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门AI工具
相关专题
想找真正自由、无限制的上网体验?本合集精选2025年最开放、隐私强、访问无阻的浏览器App,涵盖Tor、Brave、Via、X浏览器、Mullvad等高自由度工具。支持自定义搜索引擎、广告拦截、隐身模式及全球网站无障碍访问,部分更具备防追踪、去谷歌化、双内核切换等高级功能。无论日常浏览、隐私保护还是突破地域限制,总有一款适合你!
41
2025.12.31
想让网页流畅播放视频?本合集详解HTML5视频播放核心方法!涵盖<video>标签基础用法、多格式兼容(MP4/WebM/OGV)、自定义播放控件、响应式适配及常见浏览器兼容问题解决方案。无需插件,纯前端实现高清视频嵌入,助你快速打造现代化网页视频体验。
9
2025.12.31
想快速上手HTML5开发?本合集为你整理最实用的HTML5使用指南!涵盖HTML5基础语法、主流框架(如Bootstrap、Vue、React)集成方法,以及无需安装、直接在线编辑运行的平台推荐(如CodePen、JSFiddle)。无论你是新手还是进阶开发者,都能轻松掌握HTML5网页制作、响应式布局与交互功能开发,零配置开启高效前端编程之旅!
2
2025.12.31
热门下载
相关下载
精品课程
共6课时 | 0.5万人学习
共2课时 | 0.2万人学习
共6课时 | 0.3万人学习
最新文章






