77: IF(x_wip_entity_id > 0) THEN
78: /* If a row is found in mtl_demand then get its wip entity type. */
79:
80: SELECT entity_type INTO x_wip_entity_type 81: FROM wip_entities 82: WHERE wip_entity_id = x_wip_entity_id;
83:
84: ELSE
85: /* If no row was found in mtl_demand check interface table for