The role of the Mtl_supply table

Source: Internet
Author: User
Mtl_supply the role of the table, is the training of a knowledge point, and now I tidied up, posted out
1, when the purchase order creation, approval, mtl_supply changes
A. When the purchase requisition is completed, mtl_supply is empty
B. When approved, a data is generated in the mtl_supply, Supply_type_code=req
C. When the requisition is approved, the purchase head and the requisition bank are deposited in ms.req_header_id, MS. REQ_LINE_ID, at this time ms.supply_type_code=req

2, when the PO creation, approval, mtl_supply changes
A. When the requisition is converted to a PO, mtl_supply is empty when not approved
B. When approved, Mtl_supply Supply_type_code=req was changed to Supply_type_code=po
C. Generally, when requisitions are automatically created as purchase orders, their supply_type_code=req are changed to Supply_type_code=po
D. When the approved PO is canceled, Supply_type_code=po in mtl_supply is changed to Supply_type_code=req
e.--when calling a program that automatically opens a purchase order by requisition, if not approved, ms.po_header_id, MS. PO_LINE_ID,
--ms. po_release_id, MS. po_line_location_id, MS. po_distribution_id, empty if approved
--ms. req_header_id, MS. REQ_LINE_ID was emptied, MS. Supply_type_code=po, for modifying quantities in PO orders or adding new purchase order lines
--without approval, the original approved purchase order line data is unchanged, but the newly added row is not entered into the table
--When the approved PO is canceled, Supply_type_code=po in mtl_supply is changed to Supply_type_code=req,
--ms. req_header_id, MS. REQ_LINE_ID is filled with the original purchase order header and line values, while 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, was emptied.
3, when the PO received, mtl_supply changes
A. When the PO is fully received, mtl_supply Supply_type_code=po is changed to Supply_type_code=receiving
B.--When the purchase order has been received, Supply_type_code=po in mtl_supply is changed to Supply_type_code=receiving,
--Simultaneous MS. Shipment_header_id,ms. Shipment_line_id,ms. rcv_transaction_id, Deposit Shipment Header information, line information, and
--rcv_transaction's transaction_id
4, when the PO a line part received after the change of mtl_supply
A. When a portion of a PO is received, the SUPPLY_TYPE_CODE=PO in the accepted line is changed to Supply_type_code=receiving
5, when the PO test, mtl_supply what changes
A. When the PO test, accept the supply_type_code=receiving of the central bank unchanged
6, when the PO part of the storage, mtl_supply what changes; after all the storage?
A. When the PO part is in storage, the row record in the mtl_supply is deleted, and all the row records of the purchase order are deleted.
The table involved

--Approved requisitions
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 '

--Approved purchase orders
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)
--Receive

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
The explanation on the TRM is as follows
Mtl_supply stores incoming supply information for a organization.
This table forms one of the sources in Inventory ' s demand-supply form.
There is 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 is 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 was null then it
means that the shipment supply are from a Vendor.
.
This information was used by the available to promise routine to derive
The ATP information as appropiate. Quantities of items in Intransit
is also kept track of the table.
.
Records in Mtl_supply is created every time you approve a requisition
Or a PO or create an intransit shipment. One record of REQ type would
Be created for one requisition line, the requisition is approved.
One record of PO type would be created per PO distribution if a PO is
Approved and one record per shipment line would be created when a
Shipment is created.
.
Records in mtl_supply'll be recreated whenever there is
Transactions such as return to receiving, return to vendor or
Cancellation of purchase orders.
.
Records in mtl_supply is deleted every time you change the document
Status to not approved. For example, a PO would require approval if
The line and shipment quantity.
If such a PO is re-approved then the PO supply'll 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 if a PO is fully received. If a PO is
Partially received then a supply with the supply type Code of
Receiving'll is created for the quantity received. When the receipt
is delivered the receiving supply is deleted. SHIPMENT Supply works in
The same as PO supply.
.
There is a database trigger in 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
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.