hi,
this is the response i get.
what shall i do?

SQL> create global temporary table t ( x number );

Table created.

SQL>
SQL>
SQL> create or replace function get_scn return number
2 as
3 pragma autonomous_transaction;
4 l_scn number;
5 begin
6 insert into t values ( userenv('commitscn') ) returning x into l_scn;
7 commit;
8 return l_scn;
9 end;
10
11 /

Function created.

SQL> select get_scn from dual;
select get_scn from dual
*
ERROR at line 1:
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "SYS.GET_SCN", line 7
ORA-06512: at line 1