what is an anchored datatype? Ok, I think I know what you mean by an "anchored datatype" (where did you pick up that nomenclature?)
It is probably caused by this:
http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551289900368934430 consider this example, when B is granted access to A.T via a role (connect), B can reference a.t.x%type in an anonymous block but NOT a compiled stored object such as a stored procedure (or view or package or trigger or...)
when granted select directly, B can reference it.
ops$tkyte%ORA11GR2> create user a identified by a;
User created.
ops$tkyte%ORA11GR2> create user b identified by b;
User created.
ops$tkyte%ORA11GR2> grant create session, create table to a;
Grant succeeded.
ops$tkyte%ORA11GR2> alter user a default tablespace users quota unlimited on users;
User altered.
ops$tkyte%ORA11GR2>
ops$tkyte%ORA11GR2> grant connect, create procedure to b;
Grant succeeded.
ops$tkyte%ORA11GR2>
ops$tkyte%ORA11GR2> connect a/a
Connected.
a%ORA11GR2> create table t ( x int );
Table created.
a%ORA11GR2> grant select on t to connect;
Grant succeeded.
a%ORA11GR2>
a%ORA11GR2> connect b/b
Connected.
b%ORA11GR2>
b%ORA11GR2> declare
2 x a.t.x%type;
3 begin
4 null;
5 end;
6 /
PL/SQL procedure successfully completed.
b%ORA11GR2>
b%ORA11GR2> create or replace procedure p
2 as
3 x a.t.x%type;
4 begin
5 null;
6 end;
7 /
Warning: Procedure created with compilation errors.
b%ORA11GR2> show errors
Errors for PROCEDURE P:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/4 PL/SQL: Item ignored
3/4 PLS-00201: identifier 'A.T' must be declared
b%ORA11GR2>
b%ORA11GR2>
b%ORA11GR2> connect a/a
Connected.
a%ORA11GR2> grant select on t to b;
Grant succeeded.
a%ORA11GR2>
a%ORA11GR2> connect b/b
Connected.
b%ORA11GR2> create or replace procedure p
2 as
3 x a.t.x%type;
4 begin
5 null;
6 end;
7 /
Procedure created.