226:
227: -- Check elements with defined element type
228: --
229: select /*+ INDEX(e) */ count(*) into l_count
230: from cs_kb_elements_b e
231: where e.element_type_id = p_element_type_id
232: and e.status <> 'OBS';
233:
234: if(l_count > 0) then
236: return ERROR_STATUS; end if;
237:
238: /* Commented 30-Sep-2003 - Code Duplicated with above statement
239: select count(*) into l_count
240: from cs_kb_elements_b
241: where element_type_id = p_element_type_id;
242: if(l_count > 0) then
243: fnd_message.set_name('CS', 'CS_KB_C_ELE_TYPE_WITH_ELE');
244: return ERROR_STATUS;