1261: MRP_UTIL.MRP_LOG (mrp_kanban_plan_pk.g_log_message);
1262: END IF;
1263:
1264: -- now update the mrp_low_level_codes table with operation_yield
1265: -- and net_planning_percent from the bom_operation_sequences table.
1266: -- We did this separately after inserting all that we wanted to
1267: -- insert only to make the code a little cleaner. We tried doing
1268: -- this in the above sql statement itself but obviously if got
1269: -- kinda ugly trying to achieve it.
1267: -- insert only to make the code a little cleaner. We tried doing
1268: -- this in the above sql statement itself but obviously if got
1269: -- kinda ugly trying to achieve it.
1270:
1271: -- bom_inventory_components and bom_operation_sequences are linked
1272: -- by the operation sequence number and for a particular operation
1273: -- sequence we have the net_planning_percent and the operation_yield
1274: -- (actually the reverse_cumulative_yield column) stored in
1275: -- bom_operation_sequences table
1271: -- bom_inventory_components and bom_operation_sequences are linked
1272: -- by the operation sequence number and for a particular operation
1273: -- sequence we have the net_planning_percent and the operation_yield
1274: -- (actually the reverse_cumulative_yield column) stored in
1275: -- bom_operation_sequences table
1276:
1277: UPDATE mrp_low_level_codes mllc
1278: SET (mllc.operation_yield,mllc.net_planning_percent) =
1279: (SELECT min(bos.reverse_cumulative_yield),
1277: UPDATE mrp_low_level_codes mllc
1278: SET (mllc.operation_yield,mllc.net_planning_percent) =
1279: (SELECT min(bos.reverse_cumulative_yield),
1280: min(bos.net_planning_percent)
1281: FROM bom_operation_sequences bos,
1282: bom_operational_routings bor,
1283: bom_inventory_components mrp_bic,
1284: bom_bill_of_materials bbom
1285: WHERE bbom.assembly_item_id = mllc.assembly_item_id