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多维数组下标提取法【技巧】
如何检查 $_GET 数组中是否存在任意查询参数
PHP 日期列设计错误导致 MySQL 插入失败的解决方案
php如何动态获取数组下标_php动态下标获取技巧【教程】
如何正确设计考勤系统数据库结构并避免插入错误
本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门AI工具
相关专题
C++ 设计模式与软件架构
本专题深入讲解 C++ 中的常见设计模式与架构优化,包括单例模式、工厂模式、观察者模式、策略模式、命令模式等,结合实际案例展示如何在 C++ 项目中应用这些模式提升代码可维护性与扩展性。通过案例分析,帮助开发者掌握 如何运用设计模式构建高质量的软件架构,提升系统的灵活性与可扩展性。
8
2026.01.30
热门下载
相关下载
精品课程
相关推荐
/
热门推荐
/
最新课程
php-src源码分析探索
共6课时 | 0.5万人学习
搭建网站 vscode+xdebug调试php代码 调试环境搭建
共2课时 | 0.2万人学习
进程与SOCKET
共6课时 | 0.4万人学习
最新文章








