Hi Pando,
Yes, if the last fetch is less then 100 it close the loop. Also if i am just using arrays and not using any CURSOR(select statement), how to i set LIMIT clause.As you can see in the code below i am not using andy FETCH clause.
For example i have a code this.

Regards
anandkl


PROCEDURE add_cust
(
p_cust_id_array IN NUM_VARRAY,
p_words_array IN CHAR_VARRAY,
p_cat_id_array IN NUM_VARRAY,
p_no_of_occurence_array IN NUM_VARRAY,

p_error_code OUT NUMBER,
p_error_text OUT VARCHAR2
)
IS

l_idx number;

BEGIN

p_error_code := 0;

if p_cust_id_array is null OR p_words_array is null
OR p_cat_id_array is null OR p_no_of_occurence_array is null then
p_error_code := 1;
p_error_text := 'Could not insert KR_DATA '|| SQLERRM;
return;
end if;

-- 1. loop through varrays and insert into kr_data table..

if p_cust_id_array.FIRST is not null then
FORALL l_idx IN p_cust_id_array.FIRST..p_cust_id_array.LAST
insert into cust_data_temp
(cust_ID,
WORDS,
CATEG_ID,
NO_OCCURENCE)
VALUES
(p_cust_id_array(l_idx),
p_words_array(l_idx),
p_cat_id_array(l_idx),
p_no_of_occurence_array(l_idx));
else
p_error_code := 2;
p_error_text := 'input size zero ' || SQLERRM;

end if;

EXCEPTION
WHEN OTHERS THEN
p_error_code := -1;
p_error_text := 'could Not Add cust Datas ' || SQLERRM;
ROLLBACK;
RETURN;

END add_cust;