Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Sample 1:
declare
currRec integer;
begin
navigate_to_block('BLOCK_NAME');
currRec := :system.cursor_record;
first_record();
loop
exit;
ELSE
next_record;
END IF;
end loop;
go_record (currRec);
end;
Sample 2:
declare
number_of_records number;
where_am_i number;
l_deptno dept.deptno%type;
l_dname dept.dname%type;
l_loc dept.loc%type;
begin
go_block('dept');
last_record;
number_of_records := :system.cursor_record;
first_record;
loop
if checkbox_checked('dept.cb') then
where_am_i := :system.cursor_record;
l_deptno := :dept.deptno;
l_dname := :dept.dname;
l_loc := :dept.loc;
last_record;
create_record;
-- I'll make new values slightly different from the original ones
:dept.deptno := l_deptno + 1;
else
next_record;
end if;
end loop;
end;
Sample 3:
Go_Block('Block_B1');
Last_Record;
L_num_records := :system.cursor_record;
FOR i in 1..L_num_records
LOOP
Go_Block('Block_B1');
Go_Record(i);
...
...
Next_Record;
END LOOP;
First_Record;
Sample 4:
GO_BLOCK('RELATED_ITEMS');
FIRST_RECORD;
ctr := 0;
LOOP
l_current_record := get_block_property('RELATED_ITEMS',CURRENT_REC
ORD);
IF (Name_In('RELATED_ITEMS.substitution_type') = 'R' and
copy('N','RELATED_ITEMS.select_flag1');
go_record(l_current_row);
return;
END IF;
ctr := ctr + 1;
EXIT;
ELSE
NEXT_RECORD;
END IF;
END LOOP;
go_record(l_current_row);
END IF;