Oracle Message PLS-00640 - a pipelined function cannot be called from PL/SQL context

ERRORa pipelined function cannot be called from PL/SQL context
CAUSEA pipelined function was invoked from a PL/SQL expression.
ACTIONUse the pipelined function in the FROM clause of a SQL query.