A long time ago (pre-12c) I wrote about How To Reference Package Variables Outside of PL/SQL. This technique used an
execute immediate function to reference a given package variable. Another alternative at the time was to create individual
get functions for each variable.
Starting in Oracle 12c you can directly use PL/SQL in SQL and thus reference package variables in SQL. The following example shows how:
create or replace package pkg_demo as
You can also use this concept in views.