找bom清单
SELECT reserved_number, reserved_line, b.erp_control_key_group, CASE WHEN shop_order_type IN ('SP04', 'SP12') AND error_proofing_sign = 'P' THEN 0 ELSE it.scan_check END scan_check, b.component_gbo, r.work_center, b.operation, nvl(swt.swrline, ' ') bomswr, b.erp_step, nvl(b.sales_order, ' ') sales_order, nvl(to_number(b.so_line), 0) so_line, nvl(b.wbs, ' ') wbs, b.qty sumQty, menge, bmeng FROM shop_order so, routing r, routing r2, bom b, item it, swrtable swt WHERE so.shop_order = '243000172810' AND r2.work_center = '12300301' AND r2.operation = 'DIP005' AND r2.shop_order = so.shop_order AND r.erp_control_key_group = r2.erp_control_key_group AND r.shop_order = r2.shop_order AND b.shop_order = r.shop_order AND b.erp_step = r.erp_step AND b.back_flush = 'X' AND b.enabled = 1 AND b.back_flush = 'X' AND (it.item(+) = b.component_gbo AND it.site(+) = b.site) AND (swt.site(+) = b.site AND swt.shop_order(+) = b.shop_order AND swt.item(+) = b.component_gbo) ORDER BY b.erp_step, reserved_line
找条码扣料
标签:shop,imes,完工,erp,r2,swt,so,下线,order From: https://www.cnblogs.com/hlm750908/p/18520339