200: BEGIN
201:
202: select count(*) INTO l_count
203: from wsh_delivery_details wdd, 204: oe_order_lines_all l 205: where l.top_model_line_id = p_line_id
206: and wdd.source_line_id = l.line_id
207: AND wdd.inv_interfaced_flag = 'Y'
208: and wdd.SOURCE_CODE = 'OE';