67: , p_lot_rec_tbl IN lot_type_tbl
68: , x_hdr_row OUT NOCOPY gmi_discrete_transfers%ROWTYPE
69: , x_line_row_tbl OUT NOCOPY line_row_tbl
70: , x_lot_row_tbl OUT NOCOPY lot_row_tbl
71: , x_transaction_set_id OUT NOCOPY mtl_material_transactions.transaction_set_id%TYPE
72: )
73: IS
74: l_api_name CONSTANT VARCHAR2(30) := 'Create_transfer_pvt' ;
75: l_api_version CONSTANT NUMBER := 1.0 ;
1893: RAISE FND_API.G_EXC_ERROR;
1894: END IF;
1895:
1896: --everything is good. set costed flag to yes in mmt
1897: update mtl_material_transactions
1898: set costed_flag = null,
1899: opm_costed_flag = null
1900: where transaction_set_id = p_hdr_rec.transaction_header_id;
1901:
1903: --rlnagara 2 Material Status Migration ME start - Added the below code to update the status in MOQD
1904: select lot_control_code, lot_status_enabled
1905: into l_lot_ctl, l_lot_sts
1906: from mtl_system_items_b
1907: where inventory_item_id = (select inventory_item_id from mtl_material_transactions where transaction_set_id = p_hdr_rec.transaction_header_id)
1908: and organization_id = (select organization_id from mtl_material_transactions where transaction_set_id = p_hdr_rec.transaction_header_id);
1909:
1910: IF l_lot_ctl = 2 and l_lot_sts = 'Y' THEN
1911: update mtl_onhand_quantities_detail
1904: select lot_control_code, lot_status_enabled
1905: into l_lot_ctl, l_lot_sts
1906: from mtl_system_items_b
1907: where inventory_item_id = (select inventory_item_id from mtl_material_transactions where transaction_set_id = p_hdr_rec.transaction_header_id)
1908: and organization_id = (select organization_id from mtl_material_transactions where transaction_set_id = p_hdr_rec.transaction_header_id);
1909:
1910: IF l_lot_ctl = 2 and l_lot_sts = 'Y' THEN
1911: update mtl_onhand_quantities_detail
1912: set status_id = (select status_id from mtl_material_statuses
1910: IF l_lot_ctl = 2 and l_lot_sts = 'Y' THEN
1911: update mtl_onhand_quantities_detail
1912: set status_id = (select status_id from mtl_material_statuses
1913: where status_code = (select opm_lot_status from gmi_discrete_transfer_lots
1914: where transfer_id = (select transaction_source_id from mtl_material_transactions
1915: where transaction_set_id = p_hdr_rec.transaction_header_id)) )
1916: where create_transaction_id = (select transaction_id from mtl_material_transactions
1917: where transaction_set_id = p_hdr_rec.transaction_header_id) ;
1918: END IF;
1912: set status_id = (select status_id from mtl_material_statuses
1913: where status_code = (select opm_lot_status from gmi_discrete_transfer_lots
1914: where transfer_id = (select transaction_source_id from mtl_material_transactions
1915: where transaction_set_id = p_hdr_rec.transaction_header_id)) )
1916: where create_transaction_id = (select transaction_id from mtl_material_transactions
1917: where transaction_set_id = p_hdr_rec.transaction_header_id) ;
1918: END IF;
1919: --rlnagara 2 Material Status Migration ME end.
1920: