Oracle Message PLS-00540 - object not supported in this context.

ERRORobject not supported in this context.
CAUSEAn object was declared inside a local scope (Function, Procedure, or anonymous block), or in a package scope which is not supported.
ACTIONDeclare the type in a global or data base scope.