Thursday, January 9, 2020

MTL_SUPPLY RCV_SUPPLY

MTL_SUPPLY
A supply information is generated in MTL_SUPPLY, SUPPLY_TYPE_CODE = PO, SUPPLY_SOURCE_ID = PO_DISTRIBUTIONS_ALL.PO_DISTRIBUTION_ID. In addition, the PO document related information is recorded 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. (SUPPLY_TYPE_CODE = REQ)
One record of PO type will be created per PO distribution (SUPPLY_TYPE_CODE = PO) when a PO is approved and one record per shipment line will be created when a shipment is created.
RCV_SUPPLY, rcv_transactions_interface, rcv_headers_interface have no data at this time

After complete delivery[ TRANSACTION_TYPE = DELIVER], RCV_SUPPLY and MTL_SUPPLY will be deleted.

After Receipt runs successfully, you can see that the RTI data is deleted, and the RCV related data is also generated in the rcv_shipment_headers, rcv_shipment_lines, rcv_transactions, and rcv_supply tables. Rcv_shipment_headers records the information of Receipt Header, and rcv_shipment_lines records the information of Receipt's Line In order to receive the history table, RCV_SUPPLY indicates how much is still to be received (at this time, SUPPLY_TYPE_CODE is in the RECEIVING state).


When you create a standard receipt against a PO:
1. Records are inserted into RCV_TRANSACTIONS_INTERFACE with processing_status_code and transaction_status_code as 'PENDING' and transaction_type of 'RECEIVE'.
2. Shipment header is created in RCV_SHIPMENT_HEADERS.
3. Receiving Transaction Processor is called.
The ReceivingTransaction Processor does the following:
1. Unlocks all previous transactions from a failed operation so that they can be processed now.
2. Sets the processing_status_code inrcv_transactions_interface to 'RUNNING' (only in case of BATCH and IMMEDIATE processing modes).
3. Calls the actual processing function-rvtptcontrol.
In rvtptcontrolwe initialize the transaction information structure, do the validations and perform. The actual actions to complete the transactions. Here according to the transaction type we call different functions to do the actual processing.
1. Creates Shipment Line in rcv_shipment_lines . Create transaction history ie create records in rcv_transactions . In case the item is under lot or serial control then create records in rcv_lot_transactions and rcv_serial_transactions .
2. Maintain supply information. This means updating or deleting the PO supply, create RECEIVING / DELIVER supply in mtl_supply . Create rcv_supply . In case the item is under serial control then maintain rcv_serials_supply .
3. Update the RECEIVED / DELIVERED quantities in PO Distributions.
4. Close the PO for receiving if applicable.
5. Create the Inventory Interface record ie insert a record into mtl_material_transactions_temp and call the inventory function inltpu () which completes the delivery of the item into Inventory. (Rvtii.lpc)