27:
28: --Call proc to update secondary unit of measure and secondary quantity in rcv_supply.
29: Update_rcv_supply;
30:
31: --Call proc to update lots with migrated lot number in rcv_lots_supply.
32: Update_rcv_lots_supply;
33:
34: END rcv_mig_gml_data;
35:
28: --Call proc to update secondary unit of measure and secondary quantity in rcv_supply.
29: Update_rcv_supply;
30:
31: --Call proc to update lots with migrated lot number in rcv_lots_supply.
32: Update_rcv_lots_supply;
33:
34: END rcv_mig_gml_data;
35:
36:
353: END Update_rcv_supply;
354:
355: /*===========================================================================
356: -- PROCEDURE:
357: -- update_rcv_lots_supply
358: --
359: -- DESCRIPTION:
360: -- This PL/SQL procedure is used to Update RCV_LOTS_SUPPLY for LOT_NUM
361: --
356: -- PROCEDURE:
357: -- update_rcv_lots_supply
358: --
359: -- DESCRIPTION:
360: -- This PL/SQL procedure is used to Update RCV_LOTS_SUPPLY for LOT_NUM
361: --
362: -- PARAMETERS:
363: -- None
364: --
362: -- PARAMETERS:
363: -- None
364: --
365: -- SYNOPSIS:
366: -- update_rcv_lots_supply;
367: --
368: -- HISTORY
369: -- P. Bamb 10-May-2005 Created
370: --=========================================================================== */
367: --
368: -- HISTORY
369: -- P. Bamb 10-May-2005 Created
370: --=========================================================================== */
371: PROCEDURE update_rcv_lots_supply IS
372:
373: CURSOR CR_GET_LOT_SUPPLY IS
374: SELECT rls.rowid,
375: rls.transaction_id transaction_id,
382: rt.locator_id locator_id,
383: rls.reason_code,
384: rsl.item_id
385: FROM rcv_transactions rt ,
386: rcv_lots_supply rls,
387: rcv_shipment_lines rsl,
388: mtl_parameters mp
389: WHERE rls.supply_type_code = 'RECEIVING'
390: and rls.transaction_id = rt.transaction_id
394: AND rt.shipment_line_id = rsl.shipment_line_id
395: AND mp.process_enabled_flag = 'Y'
396: and not exists
397: (SELECT 'x' from GML_RCV_LOTS_MIGRATION glm
398: WHERE table_name = 'RCV_LOTS_SUPPLY'
399: and glm.transaction_id = rls.transaction_id
400: and glm.shipment_line_id = rls.shipment_line_id)
401: ORDER BY rls.transaction_id;
402:
411: rsl.to_subinventory subinventory,
412: rsl.locator_id locator_id,
413: rlt.reason_code reason_code,
414: rlt.transaction_id
415: from rcv_lots_supply rlt ,
416: rcv_shipment_lines rsl,
417: mtl_parameters mp
418: WHERE rlt.supply_type_code = 'SHIPMENT'
419: and rsl.shipment_line_id = rlt.shipment_line_id
421: AND mp.organization_id = rsl.to_organization_id
422: AND mp.process_enabled_flag = 'Y'
423: /*and not exists
424: (SELECT 'x' from GML_RCV_LOTS_MIGRATION glm
425: WHERE table_name = 'RCV_LOTS_SUPPLY'
426: And glm.shipment_line_id = rls.shipment_line_id)*/
427: ORDER BY rsl.shipment_line_id
428: FOR UPDATE OF LOT_NUM;
429:
465: --Call INVENTORY API that returns the new Lot number for the item, organization, lot, sublot,
466: -- Subinventory and Locator
467: --For any errors raise exception rcv_lot_transactions_data;
468:
469: UPDATE rcv_lots_supply
470: SET LOT_NUM = l_lot_num,
471: REASON_ID = l_reason_id
472: WHERE rowid = cr_rec.rowid;
473:
480: CREATED_BY,
481: CREATION_DATE,
482: LAST_UPDATED_BY,
483: LAST_UPDATE_DATE)
484: VALUES ( 'RCV_LOTS_SUPPLY',
485: cr_rec.transaction_id,
486: NULL,
487: cr_rec.shipment_line_id,
488: NULL,
533: --Call INVENTORY API that returns the new Lot number for the item, organization, lot, sublot,
534: -- Subinventory and Locator
535: --For any errors raise exception rcv_lot_transactions_data;
536:
537: UPDATE rcv_lots_supply
538: SET LOT_NUM = l_lot_num,
539: REASON_ID = l_reason_id
540: WHERE rowid = cr_rec1.rowid;
541:
548: CREATED_BY,
549: CREATION_DATE,
550: LAST_UPDATED_BY,
551: LAST_UPDATE_DATE)
552: VALUES ( 'RCV_LOTS_SUPPLY',
553: cr_rec1.transaction_id,
554: NULL,
555: cr_rec1.shipment_line_id,
556: NULL,
574: 'ERROR DERIVING LOT_NUM-'||substr(l_errm,1,1975),sysdate,sysdate);
575: END;
576: END LOOP;
577: COMMIT;
578: END Update_rcv_lots_supply;
579:
580: END RCV_GML_CONV_MIG;
581: