1174: LOOP
1175: FETCH L_INSTR_DEFN_CSR INTO L_INSTR_DEFN_REC;
1176: EXIT WHEN L_INSTR_DEFN_CSR%NOTFOUND;
1177:
1178: SELECT GMO_INSTR_DEFN_S.NEXTVAL INTO L_NEW_INSTRUCTION_ID FROM DUAL;
1179:
1180: -- get the correct task id for the new entity name and entity key
1181: l_entity_task_id := null;
1182: if (L_INSTR_DEFN_REC.TASK_ID is not null) then
1712: SELECT INSTRUCTION_ID INTO L_PERM_INSTR_ID FROM GMO_INSTR_DEFN_B
1713: WHERE INSTRUCTION_SET_ID = L_PERM_INSTRUCTION_SET_ID AND INSTR_SEQ = L_TEMP_INSTR_SEQ;
1714: exception
1715: when no_data_found then
1716: SELECT GMO_INSTR_DEFN_S.NEXTVAL INTO L_PERM_INSTR_ID FROM DUAL;
1717: end;
1718: update gmo_instr_defn_t set instruction_id = L_PERM_INSTR_ID where instruction_id = l_temp_instr_id;
1719: update gmo_instr_appr_defn_t set instruction_id = L_PERM_INSTR_ID where instruction_id = l_temp_instr_id;
1720: END LOOP;
6125: end if;
6126: CLOSE task_count_per_inst_set; --Code added by RBORPATL . Bug#14661007
6127: end if;
6128:
6129: select gmo_instr_defn_s.nextval into l_working_instruction_id from dual;
6130:
6131: insert into gmo_instr_defn_t
6132: (instruction_id,
6133: instruction_process_id,