A local variable type RECORD is marked as unused by the editor when only its fields are used. Also package constants and lists are marked as such.
Steps to reproduce the error:
1)Create package below
CREATE OR REPLACE PACKAGE SCOTT.test_package
IS
PROCEDURE init;
END test_package;
/
CREATE OR REPLACE PACKAGE BODY SCOTT.test_package
IS
g_con_package CONSTANT VARCHAR2( 19 ) := 'pdm_taskreport';
TYPE it_number IS TABLE OF NUMBER
INDEX BY BINARY_INTEGER;
total number;
PROCEDURE init
IS
l_it_nr it_number;
BEGIN
dbms_output.put_line(g_con_package);
dbms_output.put_line(l_it_nr.COUNT);
total := l_it_nr.COUNT ;
END;
END test_package;
/
2) Open it in the editor , r-click and choose Refactor | "Find unused Identifiers"
Toad returns
[Variable] total (7: 7)
[Constant] g_con_package (3: 4)
[Variable] l_it_nr (11: 7)
It returns l_it_nr as unused although it is being used