ERROR IS: ORA-01007: variable not in select list

I have a cursor inside a procedure which fetches some records using dynamic query. Now I need to insert these values into a table long with two more values, one is a unique ID and the other is testcase name. Unique ID- It can be anything. In this case I use a variable J and increment it by 1 each time when I fetch the record.