Please give us a complete copy/paste like the one below
C:>sqlplus scott/tiger@pdb21a
SQL*Plus: Release 21.0.0.0.0 - Production on Thu Aug 3 18:33:23 2023
Version 21.8.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Last Successful login time: Thu Aug 03 2023 18:33:03 +08:00
Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.8.0.0.0
SQL> CREATE OR REPLACE VIEW view_test AS
2 WITH
3 FUNCTION up(in_desc VARCHAR2) RETURN VARCHAR2 IS
4 BEGIN
5 RETURN UPPER(in_desc);
6 END;
7 st AS (SELECT up('Chicago') st_desc FROM dual)
8 SELECT * FROM st
9 /
View created.