OPM Batch Lot Genealogy

Description

Categories
Enginatics
Repository
GitHub
Oracle Process Manufacturing (OPM) batch lot genealogy as a multi-level tree, as shown in the Source and Where Used tabs of the Oracle Genealogy form.

Source walks from a lot through its producing batch to the ingredient lots, to any depth. Where Used walks from a lot through the consuming batches to the product lots. Each tree starts with its start lot at level 0.

Each row is a lot or batch with its level, lot status, grade, dates and the WIP issue or completion that created the link. Ended genealogy links are excluded.

Source, Supplier and Supplier Site show each lot's origination as in the form: the document and trading partner of the lot's first transaction. Supplier Site is shown for purchase order receipts only.

Without an Item or Lot Number, only lots with no other lot above them in the chosen direction start a tree, so each chain is listed once instead of under every lot within it. Enter an Item or Lot Number to see the tree of any lot.

SQL 168 lines

Parameters 4

ParameterTypeList of values SQL
Organization CodeLOV
mp_s.organization_code=:p_org_code
ItemLOV
mln_s.inventory_item_id in (select msiv.inventory_item_id from mtl_system_items_vl msiv where msiv.concatenated_segments=:p_item)
Lot Number likeChar
mln_s.lot_number like :p_lot
DirectionLOV
mog.parent_object_id tree_parent_id,
mog.parent_object_type tree_parent_type,
mog.object_id,
mog.object_type