Snippet for returning a ref cursor from a PL/SQL function:

FUNCTION my_function() RETURN SYS_REFCURSOR IS
	ref_cursor SYS_REFCURSOR;
BEGIN
OPEN ref_cursor FOR
	SELECT * FROM my_table;
	RETURN (ref_cursor);
END;