How can I create a function that I can use from different users? It must work like built-in oracle function, which can be called from any user. I guess that this can be achieved
This should do it for specific users:
GRANT EXECUTE ON your_function TO some_user;
You can allow access to all users this way:
GRANT EXECUTE ON your_function TO PUBLIC;
To reference this function from another users account, do this:
SELECT owner.your_function FROM dual;
If you want to avoid specifying the owning schema in the function reference, create a public synonym for it:
CREATE PUBLIC SYNONYM your_function FOR owner.your_function;
Then anyone can reference the function this way:
SELECT your_function FROM dual;