0% found this document useful (0 votes)
197 views3 pages

Lot Exp Analysis

The document discusses logic for populating expiration dates during lot creation and transaction processing in an inventory management system. It describes selecting expiration dates from lot records, calculating them based on shelf life if not found, and checking if lot expiration dates have passed during transactions. It also mentions populating additional lot attribute values and different handling of expiration dates for lots vs. batches.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
197 views3 pages

Lot Exp Analysis

The document discusses logic for populating expiration dates during lot creation and transaction processing in an inventory management system. It describes selecting expiration dates from lot records, calculating them based on shelf life if not found, and checking if lot expiration dates have passed during transactions. It also mentions populating additional lot attribute values and different handling of expiration dates for lots vs. batches.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Exp date during lot creation (Misc Receipt): INVLTENT.pld: SELECT expiration_action_date INTO l_exp_action_date...

SELECT expiration_action_date INTO l_exp_action_date FROM mtl_lot_numbers WHERE lot_number = l_lot_number AND inventory_item_id = l_inventory_item_id AND organization_id = l_org_id; EXCEPTION WHEN no_data_found THEN NULL; END; IF l_exp_action_date IS NULL THEN l_exp_action_date := app_date.field_to_date('lot_entry.lot_exp iration_date') + to_number(name_in('mtl_lot_reference.expirat ion_action_interval')); END IF; app_date.date_to_field(l_exp_action_date,'lot_entry.expiration_ac tion_date'); /* Also populate mtl lot reference for consistency */ app_date.date_to_field(l_exp_action_date,'mtl_lot_reference.expir ation_action_date'); END IF; --Bug#5731987 Begin End IF (NVL(name_in('mtl_lot_reference.existing_lot'), 'FALSE') = 'FALS E' AND lot_lib.global_copied_lot <> 'Y')--Global Lot ER,In case it is copied lot,then keep expiration_action_date field disabled. THEN app_item_property.set_property('lot_entry.expiration_action_date ',enterable,property_on); END IF; END IF; --INVCONV end END IF; -265 IF (to_number (name_in ('lot_control.trx_act')) = 1) THEN -- Bug 9662

IF ((to_number (name_in ('mtl_lot_reference.shelf_life_code')) = 2) OR (to_number (name_in ('mtl_lot_reference.shelf_life_code')) = 4)) THEN -- Flexdate change for bug #774739 IF (app_date.field_to_date ('lot_entry.lot_expiration_date') <= tru nc (transaction_date)) THEN fnd_message.set_name ('INV', 'INV_LOT_EXPIRED'); warned := fnd_message.warn; IF (warned = FALSE) THEN RAISE form_trigger_failure; END IF; END IF; END IF; END IF; -- Bug 9662265 app_field.set_dependent_field ('INIT', TRUE, 'lot_entry.transaction_quant set_item_property ('lot_entry.transaction_quantity', required, property_t rue); display_item ('LOT_ENTRY.TRANSACTION_QUANTITY', 'DATA_REQUIRED');

-ity');

copy ('0', 'lot_control.qty_rsvd'); copy ('0', 'lot_control.qty_rsvd2'); IF (enable_exp_date = 'greyed') THEN app_field.set_dependent_field ('INIT', FALSE, 'lot_entry.lot_expiratio n_date'); ELSIF (enable_exp_date = 'wht_updt') THEN app_field.set_dependent_field ('INIT', TRUE, 'lot_entry.lot_expiration _date'); app_field.set_required_field ('INIT', TRUE, 'lot_entry.lot_expiration_ date'); ELSIF (enable_exp_date = 'wht_noupdt') THEN app_field.set_dependent_field ('WHEN-NEW-RECORD-INSTANCE', TRUE, 'lot_ entry.lot_expiration_date'); app_field.set_required_field ('WHEN-NEW-RECORD-INSTANCE', TRUE, 'lot_e ntry.lot_expiration_date'); app_item_property.set_property ('lot_entry.lot_expiration_date', alter able, property_off); app_item_property.set_property ('lot_entry.lot_expiration_date', navig able, property_off); END IF; /* Added for Bug#5048532 * For populating the attribute values based on the Lot Number selected */ DECLARE l_org_id MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID%TYPE := to_number(name_in('PA RAMETER.ORG_ID')); l_inventory_item_id MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID%TYPE := to_numbe r(name_in('mtl_lot_reference.inventory_item_id')); l_lot_number MTL_LOT_NUMBERS.LOT_NUMBER%TYPE := name_in('lot_entry.lot_nu mber'); BEGIN is_lot_exist := 0; SELECT 1 , attribute_category INTO is_lot_exist , l_inv_attribute_category FROM mtl_lot_numbers WHERE organization_id = l_org_id AND inventory_item_id = l_inventory_item_id AND lot_number = l_lot_number; EXCEPTION WHEN no_data_found THEN is_lot_exist := 0; END; INVCEDTB.pls: IF NVL(l_transaction_action_id, -1) IN ( inv_globals.g_action_receipt , inv_globals.g_action_assycomplete ) THEN inv_cust_calc_exp_date.get_custom_lot_expiration_date p_mtli_lot_rec _rec ,p_mti_trx_rec rec ,p_mtlt_lot_rec

( => p_mtli_lot => p_mti_trx_ => p_mtlt_lot

_rec ,p_mmtt_trx_rec _rec ,p_table => p_table ,x_lot_expiration_date => x_lot_expi ration_date ,x_return_status => x_return_s tatus); END IF; IF (x_lot_expiration_date IS NULL) THEN IF l_transaction_date IS NOT NULL THEN x_lot_expiration_date:=l_transaction_date+l_shelf_life_days; ELSE x_lot_expiration_date:=SYSDATE+l_shelf_life_days; END IF; END IF; ELSE x_lot_expiration_date:=SYSDATE+l_shelf_life_days; END IF; Misc Rcpt: on line - exp date without time stamp. On lot/serial - with time stamp. Batch Details: Pending lots: no exp date Batch reservation: calls inv_reservation_pub.create_reservations inturn Batch auto detail: wms_rule_extn_pvt.InitQtyTree , gme_reservations_pvt.auto_det ail_batch In GMETTMTX.fmb: mtl_trx_line_val.check_lot_expired when validate item trigger of lpn name for batch release: GME_TRANSACTIONS_PVT.IS_LOT_EXPIRED => p_mmtt_trx

You might also like