Total Pageviews

Monday, 1 February 2021

SQL: How to Write Insert Statement using Rowtype

SQL: How to Write Insert Statement using Rowtype


  r_mtl_lot_rec := NULL;

               g_l_transaction_id := l_transaction_id;

               r_mtl_lot_rec.transaction_interface_id := l_transaction_id;

               r_mtl_lot_rec.source_code := p_transaction_type;

               r_mtl_lot_rec.source_line_id := l_transaction_id;

               r_mtl_lot_rec.last_update_date := SYSDATE;

               r_mtl_lot_rec.last_updated_by :=gv_user_id;

               r_mtl_lot_rec.creation_date := SYSDATE;

               r_mtl_lot_rec.created_by := gv_user_id;

               r_mtl_lot_rec.last_update_login := fnd_global.login_id;

               r_mtl_lot_rec.lot_number := p_lot_no;

               r_mtl_lot_rec.attribute1 := p_batch_no;

               r_mtl_lot_rec.lot_expiration_date := l_expiration_date;

               r_mtl_lot_rec.transaction_quantity := p_quantity;

               r_mtl_lot_rec.primary_quantity := p_quantity;

               r_mtl_lot_rec.serial_transaction_temp_id := l_transaction_id;

               DBMS_OUTPUT.put_line ('STEP5');


               INSERT INTO mtl_transaction_lots_interface

                    VALUES r_mtl_lot_rec;

 



FUSION: Purchasing Query

  1) ---------CPA to PO Amount---------- select poh.segment1, (select sum(nvl(cpol.quantity,1)* cpol.unit_price) from po_headers_all cpoh,po...