Oracle Error Message
PLS-00626: partitioned/clustered/ordered parameter must be a function argument
Reason for the Error
A partitioning or clustering/ordering specification specified on an argument that is not one of the function arguments.
Solution
Specify partitioning/clustering/ordering based on the function ref-cursor formal argument.